Skip to content

Commit 35ceaef

Browse files
shellcheck fix and usage comment
1 parent 9ec3a3e commit 35ceaef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/sr3_ssh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ source "${BASH_SOURCE%/*}/sr3_utils"
66
if [[ $# == 0 ]]; then
77
echo '[ERROR] no destination given'
88
echo 'Usage: sr3_ssh destination_server'
9+
echo ' or sr3_ssh -nN , where N is the line number in the DSH machine list you want to connect to"
910
exit 2
1011
fi
1112
@@ -37,7 +38,7 @@ if [[ "$1" == "-n"* ]] ; then
3738
echo "[ERROR] dsh machine list does not exist (${machine_list})."
3839
exit 4
3940
fi
40-
hostname="$(head ${1} ${machine_list} | tail -n1)"
41+
hostname="$(head "${1}" "${machine_list}" | tail -n1)"
4142
echo "Host ${1} --> ${hostname}"
4243
shift
4344
fi

0 commit comments

Comments
 (0)