1 2 3 4 5 6 7 8 9
#! /bin/sh # Fold and remove trailing white-space from files. for f do fold -s "$f" | sed 's/[[:space:]]$//' >$f.fld done