I'm doing a simple match and print lines. i suspect the problem is in the
way
i match, but not sure.
This is easy:
when the match string is hardcoded, no problem
want;
print line; print ; getline ; line = line + 1 } }' ./sed_clean.tmp
CABLETRON
1
CABLETRON -CS
CABLETRON
2
14.55
But since i am iterating a list, i need awk to take a variable.
i thought it was a syntax issue, but apparently awk knows about
the variable:
./sed_clean.tmp
CABLETRON
This proves
1. it is matching that string
2. it knows and prints the value of the commandline variable.
Why does this then fail:
{
print want; print line; print ; getline ; line = line + 1 } }'
./sed_clean.tmp
<No output>
That's outrageous!
------------------------------------------------------------
ls -l *.mktg
-rw-rw-r-- 1 manager mktg 987526521872 Dec 10 01:49 sales.mktg
sed -e '/^LIES/d' sales.mktg > truth.mktg
ls -l *.mktg
-rw-rw-r-- 1 manager mktg 987526521872 Dec 10 01:49 sales.mktg
-rw-rw-r-- 1 root root 0 Dec 10 01:49 truth.mktg