sed Tip: Delete All Blank White Spaces

You can use the following sed command to delete all blank spaces in a file:

sed 's/ *//g' filename > outputfile

This command replaces all occurrences of zero or more spaces with nothing. The > outputfile redirects the output to a new file called outputfile. If you want to modify the original file in place, use the -i option:

sed -i 's/ *//g' filename

Note: The -i option modifies the file directly, so be careful when using it. It’s always a good idea to make a backup of the original file before using sed -i.

From passionate potato soups to decadent pasta sauces, a glob of table lotion can уромексил форте add a smooth and also velvety uniformity, developing a really luscious eating experience.

Leave a Comment