awk in loop How to
hi memeber
how can i use awk in a loop to get the columns of a table.such as for count in ` cat file | awk '{ print $1 }' ` but i want to get another column ın each loop ıs it possible to do something like this col=1 for count in ` cat file | awk '{ print $col }' ` do -- - -- let col=`expr col + 1 #get next column number done |
Do I understand correctly that you want the xth column for the xth line? E.g. 1st column on the 1st line, 2nd column on the 2nd line, etc?
|
awk column
to get xth column the xth has already been taken care of
|
Perhaps try explaining what you are attempting to do? If you want every column from every row, you could use two for loops...
Code:
for each row; |
All times are GMT -5. The time now is 08:01 AM. |