Jun 8, 2004 #1 qusan Technical User Jun 8, 2004 2 US Would using awk's substr in this manner be feasible? I am trying to replace characters 35-42 with zeroes for every record in a file. runid = substr($0,35,8) zeroed ="00000000" runid=zeroed
Would using awk's substr in this manner be feasible? I am trying to replace characters 35-42 with zeroes for every record in a file. runid = substr($0,35,8) zeroed ="00000000" runid=zeroed
Jun 8, 2004 #2 PHV MIS Nov 8, 2002 53,708 FR Try something like this: awk ' {print substr($0,1,34)"00000000"substr($0,43)} ' /path/to/input > output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
Try something like this: awk ' {print substr($0,1,34)"00000000"substr($0,43)} ' /path/to/input > output Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244