i'm running gawk from inside a cgi file, not the command line.
so i'm a little confused.
i think you're saying,
#! path/to/gawk -f
begin {
OFS=FS
if ($1==n) $2-=x
print >output
}
but i'm not sure what the apostrophe after print is doing and what exactly OFS=FS is doing.
I'm learning to script with gawk, and have a small problem.
I have a file that represents a stock sheet
name1|18
name2|15
name3|4
I'm trying to modify the last field.
Is there a way to do this using print >> statements?
does print >> always append to the end of a file, even if
it's open...
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.