1

Undesired removal of white space with awk

view story
linux-howto

http://www.unix.com – Hi, I'm fairly new to scripting and I have a problem that I am having difficulty solving. What I'd like to do is run an awk script to adjust the string in the first field depending on the string in another field. This is best explained with an example: Here is my script: Code: cat find_replace.awk BEGIN{} {     if ($1 == "01" && $6 == "55"){     sub("01","07",$1);{print $0}     }     else if ($1 == "02" && $6 == "55"){     sub("02","17",$1); (HowTos)