summaryrefslogtreecommitdiff
path: root/fmt/strip-blank
blob: 2be9030f1128a32f66d80552921958ce88d4195f (plain) (blame)
1
2
3
4
5
6
#!/bin/sh 
# Strip blank lines, including lines which only have whitespace. 

[ $# -ge 1 -a -f "$1" ] && in="$1" || in="-"

grep -v '^[[:blank:]]*$' "$in"