2010/8/21 Suraj Kurapati <sun...@gmail.com>:
> I like to put documentation at the head of a file because that's only
> part anyone will read before deciding if it's worth spending their
> time to delve into the rest of the shell script.  Also, I don't like
> messing up my program's indentation because I have to emit a big block
> of text in it:

#!/bin/sh

USAGE="\
Usage: $0 -flags args
Explain the options here.
You even can even use use shell variables!
"

if [ $# -lt 1]; then
    echo -n "$USAGE" 1>&2
    exit 1
fi

Is this really so ugly?

-- 
- yiyus || JGL . 4l77.com

Reply via email to