Thursday, December 6, 2012

How to delete spaces using sed in Linux

I faced a issue where my configuration file contains name=value pairs. But automation scripts generated configuration file which contains "name = value". There is space between name and value. To delete the spaces, I used the following command.
#cat inputfilename | sed 's/ //g' > outputfilename

Pin It
Related Posts Plugin for WordPress, Blogger...