Loading...
 
Skip to main content

Text Processing

Remove blank lines from a file sed /^$/d
Remove CRLF from a file tr -d '\n' < file
Remove leading whitespace sed 's/^[ ]*//' # The line has 1 space and 1 tab between the [].
Remove trailing whitespace sed 's/[ ]*$//' # The line has 1 space and 1 tab between the [].
Upper Case tr "[:lower:]" "[:upper:]" < filename
Lower Case tr "[:upper:]" "[:lower:]" < filename


sed Commands



Created by system. Last Modification: Monday 28 of February, 2005 12:59:08 MST by john.