cheat sed, remove leading spaces with regex

This commit is contained in:
Carlos Peña 2013-08-27 00:06:30 +03:00
parent e6d5d9b8dc
commit 9500ca8446

View File

@ -6,3 +6,6 @@ sed -i 's/day/night/g' file.txt
# To replace all occurrences of "day" with "night" on stdin:
echo 'It is daytime' | sed 's/day/night/g'
# To remove leading spaces
sed -i -r 's/^\s+//g' file.txt