Hi PVH,
original code:
nawk -F, '{OFS=","; print $1,$2,"00"$3" ",$4" PH",$6," PAYROLL HOURS USD ",$5,$7,$8}' /tmp/payfile > /tmp/paywork1
new (I still need help on what to do with inputs ($5,$7,$8)
nawk -F, '{printf...
Thanks for replying. So if I have another line like this:
nawk -F, '{OFS=","; print $1,$2,"00"$3" ",$4" PH",$6," PAYROLL HOURS USD ",$5,$7,$8}' /tmp/payfile > /tmp/paywork1
The same code can be written as this (based on...
I am new to AWK....I have these lines of codes, tried to run and received error but didn't understand the error msg.
awk '
var1 = length($3)
if (var1 = 6)
nawk -F, '{OFS=","; print $1,$2,"00"$3" ",$8}' /tmp/payfile > /tmp/paywork1
if (var1 = 5)
nawk -F, '{OFS=","; print...
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.