How i can delete whitespace in each line of file, using bash For instance, file1.txt. Before:
gg g gg g t ttt
after:
gg
use can use perl -i for in place replacement.
perl -p -e 's/^ *//' file