Removing White Space with Sed
Diff-ing two files can be frustrating when it’s throwing variations because of white space. Here’s a neat oneliner that will remove trailing white space from every single line in a file named “myfile”: sed -i ‘s/[ t]*$//’ $1 filename This will strip white space in-place (note the use of the -i option). Now sort (if Read More …