How do I remove leading spaces in Unix?

Man Ly

New member
How do I remove leading spaces in Unix?
Answer
sed command:
The 1st command removes the leading spaces, the second removes the trailing spaces and the last replaces a group of spaces with a single space. The source file itself can be updated by using the -i option of sed.
 

Tìm kiếm

Back
Top