diff options
author | Kyah Rindlisbacher <kyah101@hotmail.com> | 2012-05-08 18:04:26 +1000 |
---|---|---|
committer | Kyah Rindlisbacher <kyah101@hotmail.com> | 2012-05-08 18:04:26 +1000 |
commit | 40c0f58ca8838cff19d56f6a64bfb2b1c4f28cc1 (patch) | |
tree | e0d4af301879b596371452ec5b014802037aae94 /ponysay | |
parent | 3ed997195b7eccf1438311dc332d93a8dce06d19 (diff) | |
download | ponysay-40c0f58ca8838cff19d56f6a64bfb2b1c4f28cc1.tar.gz ponysay-40c0f58ca8838cff19d56f6a64bfb2b1c4f28cc1.tar.bz2 ponysay-40c0f58ca8838cff19d56f6a64bfb2b1c4f28cc1.zip |
Check for stdin and args
Diffstat (limited to 'ponysay')
-rwxr-xr-x | ponysay | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -45,6 +45,12 @@ Options: EOF } +# if no stdin and no argumrnts then print usage and exit +if [[ -t 0 && $# == 0 ]]; then + usage + exit +fi + say() { # Ponies use UTF-8 drawing characters. Prevent a Perl warning. export PERL_UNICODE=S |