It's also wise to clean up any leading white-space since I don't know how john the ripper or other cracking applications will deal with it. sed "s/^[ \t]*//" -i ...