From 070d584d4938f0124d32462ed6423bf0a27c84a0 Mon Sep 17 00:00:00 2001 From: Tim Cartwright Date: Thu, 8 Oct 2026 16:07:27 -0500 Subject: [PATCH] Fix awk and tr commands a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The awk command with the `\#` caused warnings on every invocation (which the Ops team would often send to campus folks), so I cleaned that up. And then I just tidied a bit — made the awk program a little clearer, and removed the extraneous second `"` from the tr SET1 argument. I tested these modifications on the OU Hosted CE. --- hosted-ce/usr/local/bin/ssh-to-login-node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosted-ce/usr/local/bin/ssh-to-login-node b/hosted-ce/usr/local/bin/ssh-to-login-node index 1616f44..451eb0a 100755 --- a/hosted-ce/usr/local/bin/ssh-to-login-node +++ b/hosted-ce/usr/local/bin/ssh-to-login-node @@ -7,5 +7,5 @@ else user=$(id -un) fi global_ssh_config=/etc/ssh/ssh_config -login_host=$(awk "/^Host.*\# remote login host/ {print \$2; exit}" "$global_ssh_config" | tr -d '""') +login_host=$(awk '/^Host (.*) # remote login host/ {print $2; exit}' "$global_ssh_config" | tr -d '"') exec ssh -l "$user" -F "$global_ssh_config" "$login_host" "$@"