S
Steve Starr
I am trying to find out how to search a file and find certain key words
then print them.
Example:
#!/usr/bin/ruby
system("cat /proc/partitions > drives.txt")
Output:
8 0 1007616 sda
8 1 1007600 sda1
3 0 33027622 hda
3 1 14651248 hda1
3 2 14651280 hda2
3 3 3719047 hda3
Now i would just want to print the word hda to the screen.
Any help would be nice.
Thanks
then print them.
Example:
#!/usr/bin/ruby
system("cat /proc/partitions > drives.txt")
Output:
8 0 1007616 sda
8 1 1007600 sda1
3 0 33027622 hda
3 1 14651248 hda1
3 2 14651280 hda2
3 3 3719047 hda3
Now i would just want to print the word hda to the screen.
Any help would be nice.
Thanks