How to remove all whitespaces (including tabs) from left to first word

To remove all whitespaces (including tabs) from left to first word, we can use sed command.

#sed -e 's/^[ \t]*//' file

Where file is the name of the file to be processed.

 

Leave a Reply

Your email address will not be published. Required fields are marked *