: ########################################################################## # Shellscript: tabulize - substitute whitspace with TABs # Version : 0.1 (beta) # Author : Heiner Steven (heiner.steven@odn.de) # Date : 25.02.1998 # Category : Text Utilities, File Conversion # SCCS-Id. : $Id: tabulize,v 1.1.1.1 1999/06/15 19:29:05 heiner Exp $ ########################################################################## # Description # - Replaces all sequences of two or more space or TAB characters # with one TAB character (ASCII 9). ########################################################################## PN=`basename "$0"` # Program name VER='0.1 (beta)' Usage () { echo >&2 "$PN - substitute whitespace with TABs, $VER (stv '98) usage: $PN [file ...]" exit 1 } set -- `getopt h "$@"` while [ $# -gt 0 ] do case "$1" in # your flags here --) shift; break;; -h) Usage;; -*) Usage;; *) break;; # First file name esac shift done exec sed 's:[ ][ ]*: :' "$@"