diff options
Diffstat (limited to 'fmt/strip-blank')
-rwxr-xr-x | fmt/strip-blank | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fmt/strip-blank b/fmt/strip-blank new file mode 100755 index 0000000..2be9030 --- /dev/null +++ b/fmt/strip-blank @@ -0,0 +1,6 @@ +#!/bin/sh +# Strip blank lines, including lines which only have whitespace. + +[ $# -ge 1 -a -f "$1" ] && in="$1" || in="-" + +grep -v '^[[:blank:]]*$' "$in" |