diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-07 01:09:38 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-07 01:09:38 +1300 |
commit | 79644d5772fb4cfc2c8529c1ac886f14d1573998 (patch) | |
tree | e1d15a4a8bbdef5939203994b42c810ad189a712 /bin | |
parent | Tolerate C-M-l for clear window in ksh (diff) | |
download | dotfiles-79644d5772fb4cfc2c8529c1ac886f14d1573998.tar.gz dotfiles-79644d5772fb4cfc2c8529c1ac886f14d1573998.zip |
Update rfcf(1df) and rfcr(1df) idioms
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/rfcf | 9 | ||||
-rwxr-xr-x | bin/rfcr | 9 |
2 files changed, 10 insertions, 8 deletions
@@ -1,11 +1,12 @@ #!/bin/sh -# Figure out RFC number -self=rfcf -if ! [ "$1" ] ; then - printf >&2 '%s: Need an RFC number\n' "$self" +# Check arguments +if [ "$#" -ne 1 ] ; then + printf >&2 'rfcf: Need one RFC number\n' exit 2 fi + +# Argument is RFC number rn=$1 # Retrieve the RFC with curl(1) @@ -1,11 +1,12 @@ #!/bin/sh -# Figure out RFC number -self=rfcr -if ! [ "$1" ] ; then - printf >&2 '%s: Need an RFC number\n' "$self" +# Check arguments +if [ "$#" -ne 1 ] ; then + printf >&2 'rfcf: Need one RFC number\n' exit 2 fi + +# Argument is RFC number rn=$1 # Retrieve the RFC with rfcf(1df) |