Better formatted usage message.

This commit is contained in:
Simon Gomizelj 2011-11-29 10:28:45 -05:00
commit 926ea03109

View file

@ -21,32 +21,29 @@ USAGE
piped_data | $0 piped_data | $0
INPUT METHODS INPUT METHODS
$0 can accept piped data, STDIN redirection [<filename.txt], text strings
$0 can accept piped data, STDIN redirection [<filename.txt], text strings following the command as arguments, or filenames as arguments. Only one
following the command as arguments, or filenames as arguments. Only one of these methods can be used at a time, so please see the note on
of these methods can be used at a time, so please see the note on precedence. Also, note that using a pipe or STDIN redirection will treat
precedence. Also, note that using a pipe or STDIN redirection will treat tabs as spaces, or disregard them entirely (if they appear at the
tabs as spaces, or disregard them entirely (if they appear at the beginning of a line). So I suggest using a filename as an argument if
beginning of a line). So I suggest using a filename as an argument if tabs are important either to the function or readability of the code.
tabs are important either to the function or readability of the code.
PRECEDENCE PRECEDENCE
STDIN redirection has precedence, then piped input, then a filename as an
argument. Example:
STDIN redirection has precedence, then piped input, then a filename as an echo piped | "$0" arguments.txt < stdin_redirection.txt
argument. Example:
echo piped | "$0" arguments.txt < stdin_redirection.txt In this example, the contents of file_as_stdin_redirection.txt would be
uploaded. Both the piped_text and the file_as_argument.txt are ignored. If
In this example, the contents of file_as_stdin_redirection.txt would be there is piped input and arguments, the arguments will be ignored, and the
uploaded. Both the piped_text and the file_as_argument.txt are ignored. If piped input uploaded.
there is piped input and arguments, the arguments will be ignored, and the
piped input uploaded.
FILENAMES FILENAMES
If a filename is misspelled or doesn't have the necessary path
If a filename is misspelled or doesn't have the necessary path description, it will NOT generate an error, but will instead treat it as
description, it will NOT generate an error, but will instead treat it as a text string and upload it.
a text string and upload it.
HERE HERE
} }