Quote:
Originally Posted by Danish Shakil
Hello!!
I have the text file with following format...
--SubTotal-----------------------------------0--161---------------44---13739369-67---
--SubTotal-----------------------------------0--147---------------0----49643---1----
--SubTotal-----------------------------------0--161---------------20---13750219-31---
--SubTotal-----------------------------------0--147---------------0----49679---0----
I want to extract bold figures in two different columns of output file.
Line 1 and 3 in 1st column while line 2 and 4 in second column.
[...]
|
Code:
awk 'NR%2?$0=$6:$0=" "$6"\n"' ORS= FS="--*" filename
Use /usr/xpg4/bin/awk on Solaris.