Martin ... this should do the trick. You need to set the Output Field Separator (OFS) as well.
awk 'BEGIN {FS="|";OFS="|"} {$3="00000000";print}' inputfile > outputfile
thanks, Greg! Examples worked great. One thing, if you're doing numeric manipulations on a string that's not a number, awk tends to add extra fields. One way I got around this is specifying the input FS in the command line,
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.