aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-07 01:09:38 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-07 01:09:38 +1300
commit79644d5772fb4cfc2c8529c1ac886f14d1573998 (patch)
treee1d15a4a8bbdef5939203994b42c810ad189a712 /bin
parentTolerate C-M-l for clear window in ksh (diff)
downloaddotfiles-79644d5772fb4cfc2c8529c1ac886f14d1573998.tar.gz
dotfiles-79644d5772fb4cfc2c8529c1ac886f14d1573998.zip
Update rfcf(1df) and rfcr(1df) idioms
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rfcf9
-rwxr-xr-xbin/rfcr9
2 files changed, 10 insertions, 8 deletions
diff --git a/bin/rfcf b/bin/rfcf
index 633eaace..6f257415 100755
--- a/bin/rfcf
+++ b/bin/rfcf
@@ -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)
diff --git a/bin/rfcr b/bin/rfcr
index 03de898d..75d9abb0 100755
--- a/bin/rfcr
+++ b/bin/rfcr
@@ -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)