//View Tip #11
Similar Tips
» Random xkcd comic
» Copy and paste from the command line
» Calendar with current date
» Command examples from shell-fu
» BBC Weather


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Add commas to all numeric strings in a file, changing "1234567" to "1,234,567"

sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta' filename

View Comments »


Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit