this blog is a feature
leave a comment »
Thanks to Jigen, this is another method to add and remove semicolon with sed. The result is the same as here.
To add semicolon:
sed -e ’s/[01]/&;/g’ foo
To remove semicolon:
sed -e ’s/\([01]\);/\1/g’ foo
Written by whitenoise
October 30, 2007 at 8:07 pm
Posted in Linux, know-how, scripting
Tagged with bash, linux, scripting, sed
Name (required)
E-mail (will not be published) (required)
Website
Notify me of follow-up comments via email.
Notify me of new posts via email.