Link to home
Start Free TrialLog in
Avatar of stakor
stakorFlag for United States of America

asked on

Flush Left Text File

I am working with a text file that may or may not have parts of the text indented. I want to make sure that all of the text has no white space  to the left of the first non-whitespace character. In VI, I can just type "<<" to make this happen, but I need to be able to do this from a simple script. Is there a way to do this from a command line?

So for instance:

test1
  test2
     test3

Becomes:
test1
test2
test3
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial