hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone
For a simliar thread I replied. Was that not working after I gave corrected solution?
---------- Post updated at 08:09 PM ---------- Previous update was at 08:08 PM ----------
Hi rakesh this is differen one.. but looks same....
I know, you should have tried after seeing the previous solution.
Try:
awk '/^~/ {gsub(/~/,"",$1); gsub(/~/,"",$2); gsub(/~/,"",$3); gsub(/~/,"",$4); print $1","$2","$3","$4}' b
If you are certain there are only 4 fields then you can do it using $0...
gsub is not there...