Function to trim each line instead of stdin
Function to trim each line instead of stdin

Tests:
test "$(trim $'\n' < ~/.bash_aliases | wc -l)" = "$(wc -l < ~/.bash_aliases)" || echo fail
test "$(printf $' \tfoo \t\n \tbar \t' | trim $'\n'; printf x)" = $'foo\nbarx' || echo fail

sukhmel/linux.scripts,sukhmel/linux.scripts