From 6b16d90f846c7777e0ce3f3f0760a11610aa909a Mon Sep 17 00:00:00 2001 From: Guillaume Archambault Date: Sat, 3 Aug 2024 09:49:25 +0200 Subject: [PATCH] List in alphabetical order --- sshm.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshm.bash b/sshm.bash index 1ba53b3..a2e8d98 100755 --- a/sshm.bash +++ b/sshm.bash @@ -43,7 +43,7 @@ EOF ssh_manager_list() { local config_file=~/.ssh/config echo -e "\nList of SSH hosts:" - grep -E '^Host ' "$config_file" | awk '{print $2}' | grep -v '^#' | nl + grep -E '^Host ' "$config_file" | awk '{print $2}' | grep -v '^#' | sort | nl echo -ne "\nEnter the number or name of the host (or press Enter to exit): " read host