I have a file and need to update the specific position on line two. I tried to use this solution under the post "Awk command to replace specific position characters"
But need a way to just limit to update the line 2 and not every line on the file.
awk 'function repl(s,f,t,v) { return substr(s,1,f-1) sprintf("%-*s", t-f+1, v) substr(s,t+1) } { a=repl($0,37,46,"0000000002") print a }' infile
Can someone help.