aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-31 00:51:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-31 00:51:32 +1200
commitaaf282eb75ecad7dd93937f1fc470365743499c4 (patch)
tree0b3b943d5e5f46a543dc536e0355ae2cc840c8ad
parentSimplify plmu(1) and make it POSIX sh (diff)
downloaddotfiles-aaf282eb75ecad7dd93937f1fc470365743499c4.tar.gz
dotfiles-aaf282eb75ecad7dd93937f1fc470365743499c4.zip
Correct "return" to "exit" in shell scripts
-rwxr-xr-xbin/pa2
-rwxr-xr-xbin/paz2
-rwxr-xr-xbin/sta2
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/pa b/bin/pa
index 35966464..35aa6773 100755
--- a/bin/pa
+++ b/bin/pa
@@ -1,4 +1,4 @@
#!/bin/sh
# Print arguments, one per line. Compare paz(1).
-[ "$#" -gt 0 ] || return 0
+[ "$#" -gt 0 ] || exit 0
printf '%s\n' "$@"
diff --git a/bin/paz b/bin/paz
index 679c55f8..2cc31c6e 100755
--- a/bin/paz
+++ b/bin/paz
@@ -1,4 +1,4 @@
#!/bin/sh
# Print arguments, terminated by null chars. Compare pa(1).
-[ "$#" -gt 0 ] || return 0
+[ "$#" -gt 0 ] || exit 0
printf '%s\0' "$@"
diff --git a/bin/sta b/bin/sta
index 5d8ee825..b5ae56f5 100755
--- a/bin/sta
+++ b/bin/sta
@@ -1,5 +1,5 @@
#!/bin/sh
-# Print list of sls(1) hostnames that return 0 when a connection is attempted
+# Print list of sls(1) hostnames that exit 0 when a connection is attempted
# and the optional given command is run. Discard stdout, but preserve stderr.
sls | while read -r hostname ; do
ssh -nq -- "$hostname" "$@" >/dev/null || continue