#!/bin/sh # Strip blank lines, including lines which only have whitespace. [ $# -ge 1 -a -f "$1" ] && in="$1" || in="-" grep -v '^[[:blank:]]*$' "$in"