From 79644d5772fb4cfc2c8529c1ac886f14d1573998 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 7 Jan 2017 01:09:38 +1300 Subject: Update rfcf(1df) and rfcr(1df) idioms --- bin/rfcf | 9 +++++---- bin/rfcr | 9 +++++---- 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) -- cgit v1.2.3