I am trying to learn something new. I know I can cat a file, read each record, and utilize a counter until I get to a specific line number. Is there a way to pull just a specific line out of a file?
I trying to find something as clean as how
awk '{print $2}'
pulls just the second column.
I am working with a testfile that is set up in a grid, and I want to efficiantly pull the value from a specific slot based on xy cordinates fed from a seperate file. The actual file will be quite large.
testfile would look like this
f0 f1 f2 f3 f4
f5 f6 f7 f8 f9
fa fb fc fd fe
so if the value from the other file is 32, then by echoing the $data in row 3 column 2, we get an output of "fb"
I am looking for the fastest and cleanest way. My thought was to grab just the specific line and then awk the column.
Looking forward to reading your ideas. Thanks.
-Bobby s-)
bwgunn@icqmail.com
I trying to find something as clean as how
awk '{print $2}'
pulls just the second column.
I am working with a testfile that is set up in a grid, and I want to efficiantly pull the value from a specific slot based on xy cordinates fed from a seperate file. The actual file will be quite large.
testfile would look like this
f0 f1 f2 f3 f4
f5 f6 f7 f8 f9
fa fb fc fd fe
so if the value from the other file is 32, then by echoing the $data in row 3 column 2, we get an output of "fb"
I am looking for the fastest and cleanest way. My thought was to grab just the specific line and then awk the column.
Looking forward to reading your ideas. Thanks.
-Bobby s-)
bwgunn@icqmail.com