Remove leading whitespace from a text file


/ Published in: Other
Save to your folder(s)

This one-liner will remove all leading whitespace (including tabs) from a text file and write the output to STDOUT.


Copy this code and paste it in your HTML
  1. $ cat file.txt | sed -e 's/^[ \t]*//'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.