sed - Replacing second column using shell script -


I want to change the second column in upper case and I want to do this only in the shell script. (No liner!)

  #! Read file line by / bin / sh # line file = "/ pdump / country.000000.txt" while reading line for mycol = `echo $ line | Awk -F "," '{print $ 2}' 'mycol_new =' echo $ mycol | Tr "[: bottom:]" [: upper:] `$ line echo | "$ 1", "$ mycol_new", "$ 3", "$ 4", "$ 5", "$ 6", "$ 7", "$ 8} '& lt; $ File   

I'm not able to change $ mycol_new $$. Any suggestions?

< P> awk can not see $ mycol_new because it is the shell variable -v flag:
  resonance $ There is a way to go awk in a shell variable using the line: "$ 5", "$ 4", "$ 5", "$ 6", "$ 7", "$ 8} '  

This is an alternative way to open $ mycol_new :

  echo $ line | Awk -F "," $ 1 print, "" $ mycol_new "," $ 3 "," $ 4 "," $ 5 "," $ 6 "," $ 7 "," $ 8} ' >   

Comments