Hi,
We're using Redhat Linux 7.9 with bsh.
I want to go through a data file and replace all the fields between columns 10 and 20 that have blanks with 0s.
So if I have an example file of:
"#######################
#######################
#######################
######### ######
#######################
#######################
#######################
#######################"
I want the script to make it look like :
"#######################
#######################
#######################
#########000000000######
#######################
#######################"
#######################
#######################"
I've tried usign the followig:
awk '{val=substr($0,10,19);gsub(val," ","000000000")}1' scr1
But it only returns the original file. What did I miss?
Thanks!