parse multiple lines? should be a easy answer...

inputfile:

A B C D
E F G H
1 2 3 4

-----------

I want to read these and put them into a variable:

file=../inputfile
col2line1=`cat $file | awk '{print $2}'`

how do i extract row 2's E,F,G,H or row 3's 1,2,3,4???

I tried the search, didn't get much, maybe i suck at searching too :o

always go here first

it's kind of funny cus i actually spent about 30 mins on google before i came back on here...

but i think i got something that will improvise...i'll post something back if it works as expected or not...thanks

it's kind of funny cus i actually spent about 30 mins on google before i came back on here...

but i think i got something that will improvise...i'll post something back if it works as expected or not...thanks

Print the second line:

perl -ne 'print if 2..2' $file

Print lines 2 to 10:

perl -ne 'print if 2..10' $file

etc.