mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2025-09-08 13:50:40 +02:00
List in alphabetical order
This commit is contained in:
parent
951a717198
commit
6b16d90f84
@ -43,7 +43,7 @@ EOF
|
|||||||
ssh_manager_list() {
|
ssh_manager_list() {
|
||||||
local config_file=~/.ssh/config
|
local config_file=~/.ssh/config
|
||||||
echo -e "\nList of SSH hosts:"
|
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): "
|
echo -ne "\nEnter the number or name of the host (or press Enter to exit): "
|
||||||
read host
|
read host
|
||||||
|
Loading…
x
Reference in New Issue
Block a user