Sed: to add one space after comma

1. use sed to add a space after comma
2. use sed to replace multiple space(or tab) after comma with one space
3. use sed to perform 1. and 2. using -e option

# cat debug.txt
a, {, 9,L,%

# sed -i.bak -e 's/,/, /g' -e "s/,[ \t]*/, /g" debug.txt

# cat debug.txt
a, {, 9, L, %

No comments: