i have a line that has ",,", i need to change it to "," ; But i have it more than one time in the same line , sub(",,",",",$0) just sub the first one in the line?
---------- Post updated at 08:15 AM ---------- Previous update was at 08:15 AM ----------
using AWK please
using sub changes 1st instance:
# echo "hello,,world,,how, are,,you" | nawk '{sub(",,",",",$0);print}'
hello,world,,how, are,,you
using gsub changes all instances:
# echo "hello,,world,,how, are,,you" | nawk '{gsub(",,",",",$0);print}'
hello,world,how, are,you
HTH
thanks a lot , i will try it