Posted By

retry on 07/29/08


Tagged

whitespace sed


Versions (?)

Remove leading whitespace from a text file


 / Published in: Other
 

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

  1. $ cat file.txt | sed -e 's/^[ \t]*//'

Report this snippet  

You need to login to post a comment.