diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:06:41 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 17:42:03 +1200 |
commit | 832acfdc942c9718cb0db9d4d12b85c8198a2bc8 (patch) | |
tree | a09cb156b7ff593d5f336246fef501d59aa239b2 | |
parent | No need to quote in variable assignment (diff) | |
download | psshd-832acfdc942c9718cb0db9d4d12b85c8198a2bc8.tar.gz psshd-832acfdc942c9718cb0db9d4d12b85c8198a2bc8.zip |
Fix harebrained printf patterns
-rwxr-xr-x | psshd | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -36,11 +36,11 @@ while getopts ':p:' opt; do port=$OPTARG ;; \?) - printf "Invalid option $OPTARG\n" >&2 + printf 'Invalid option %s\n' "$OPTARG" >&2 exit 1 ;; :) - printf "Option -$OPTARG requires an argument\n" >&2 + printf 'Option -%s requires an argument\n' "$OPTARG" >&2 exit 1 ;; esac @@ -49,14 +49,14 @@ shift $((OPTIND-1)) # If no port, give up with usage instructions if ! [[ "$port" ]]; then - printf "USAGE: $0 -p <port number> -- <ssh arguments>\n" + printf 'USAGE: %s -p <port number> -- <ssh arguments>\n' "$self" exit 1 fi # Set up a PID dir dir=${TMPDIR:-/tmp}/psshd-${UID} if ! mkdir -p "$dir"; then - printf "Couldn't create directory ${dir} for PID file\n" >&2 + printf 'Could not create directory %s for PID file\n' "$dir" >&2 exit 1 fi |