I have a simple shell script that removes trailing whitespace from a file. Is there any way to make this script more compact (without creating a temporary file)?
<
Thanks to codaddict for suggesting the -i option.
-i
The following command solves the problem on Snow Leopard
sed -i '' -e's/[ \t]*$//' "$1"