User Tools

Site Tools


bash:files:delete_leading_whitespace_spaces_or_tabs_from_front_of_each_line_in_a_file

BASH - Files - Delete leading whitespace (spaces or tabs) from front of each line in a file

Delete the leading whitespace (spaces or tabs) from front of each line.

Text will end up flush left.

awk '{sub(/^[ \t]+/, ""); print}' filename
bash/files/delete_leading_whitespace_spaces_or_tabs_from_front_of_each_line_in_a_file.txt · Last modified: 2022/06/13 11:35 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki