Search code examples
windowslinuxtextgnuwin32

Removing leading spaces in a text file


I have a bunch of texts files although they all have spaces at the beginning of lines

e.g.

 testing 123
 download
 upload

would be

testing 123
download
upload

Preferably using a utility such as grep etc.


Solution

  • sed -i -e's/^\s*//' yourfilenamehere