#!/bin/bash if [ "" == "$*" ]; then echo "zaptrail: remove trailing white space" echo "Usage: zaptrail ...." exit 1 fi sed -i -r -e 's/\s+$//' $*