cp temp.txt res.txt cat var.txt | egrep "! " | awk '{print "sed -i s#"$2 "#" $3"#g res.txt"}' #sed -i "s/__VRFXFERIPSW2__/XyZ/g" res.txt