Or you can use bash to remove matched strings from a variable, e.g...$ JUNK="item1 item2 item3"
$ JUNK=${JUNK//item2/}
$ echo $JUNK
item1 item3
$ JUNK=${JUNK//item3/}
$ echo $JUNK
item1
Perhaps a problem with the output format, otherwise I don't see any problems...awk -v a=50.5555333 -v b=20.00 -v OFMT=%.7f 'BEGIN{print a - b}'...gives...
30.5555333
You can "comment" several lines in a script like this...
command1
: << COMMENT!
command2
command3
COMMENT!
command4
This prevents command2 and command3 from running.
All you need to do is match your header records to a pattern, e.g. assuming all header records begin with "h"...$ awk '/^h/{close(f); f=sprintf("outfile.%03d",++n)}{print $0 > f}' infile
$ head outfile.*
==> outfile.001 <==
h1234567890 1234567890 1234567890
dqwertyuiop qwertyuiop qwertyuiop...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.