We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 850eebd commit bbaee2bCopy full SHA for bbaee2b
bin/sr3_ssh
@@ -32,13 +32,14 @@ if [ -e "${ssh_user_config}" ] && { [ -z "${SSH_AUTH_SOCK}" ] || [ -z "${SSH_AGE
32
fi
33
34
# numerical host, issue #19
35
-if [[ "$1" == "-n"* ]] ; then
+if [[ "$1" == "-nn"* ]] ; then
36
machine_list="${git_tld}/_dsh_config/${pump_name}.list"
37
if [ ! -e "${machine_list}" ]; then
38
echo "[ERROR] dsh machine list does not exist (${machine_list})."
39
exit 4
40
41
- hostname="$(head "${1}" "${machine_list}" | tail -n1)"
+ head_n="${1/nn/n}"
42
+ hostname="$(head "${head_n}" "${machine_list}" | tail -n1)"
43
echo "Host ${1} --> ${hostname}"
44
shift
45
0 commit comments