diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-31 00:51:32 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-31 00:51:32 +1200 |
commit | aaf282eb75ecad7dd93937f1fc470365743499c4 (patch) | |
tree | 0b3b943d5e5f46a543dc536e0355ae2cc840c8ad | |
parent | Simplify plmu(1) and make it POSIX sh (diff) | |
download | dotfiles-aaf282eb75ecad7dd93937f1fc470365743499c4.tar.gz dotfiles-aaf282eb75ecad7dd93937f1fc470365743499c4.zip |
Correct "return" to "exit" in shell scripts
-rwxr-xr-x | bin/pa | 2 | ||||
-rwxr-xr-x | bin/paz | 2 | ||||
-rwxr-xr-x | bin/sta | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -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' "$@" @@ -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' "$@" @@ -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 |