4 ms·
True. But there are differences when -v is used, as opposed to FS. Try this, where "nawk" is Lucent awk used by BSD cat > 1.awk << eof { print $AR
by 3xblah 7y ago
True. But there are differences when -v is used, as opposed to FS. Try this, where "nawk" is Lucent awk used by BSD
cat > 1.awk << eof
{ print $ARGC }
eof
echo|nawk -f 1.awk FS=":"
echo|gawk -f 1.awk FS=":"
echo|nawk -f 1.awk -v FS=":"
echo|gawk -f 1.awk -v FS=":"
- Annatar 7y agoThat is not how FS is set; It's set with -F. And there is actually no need to use -v, passing variables at the end works consistently across all AWK's and always has: echo "" | awk '{print Bla;}' Bla="Hello."