Compare commits

...

2 Commits

Author SHA1 Message Date
Guillaume Archambault
281b541655
Update README.md 2024-10-20 16:32:08 +02:00
Guillaume Archambault
0a933edc68
Update sshm.bash
Erreur à la ligne 84
2024-10-20 16:05:02 +02:00
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ SSH Manager (sshm) is a bash script that simplifies and automates the management
3. Move the script to a directory in your PATH, for example:
```bash
sudo mv sshm /usr/local/bin/
sudo mv sshm.bash /usr/local/bin/sshm
```
## Usage
@ -173,4 +173,4 @@ This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE
## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contributions are welcome! Please open an issue or submit a pull request.

View File

@ -81,7 +81,7 @@ ssh_manager_connect() {
if [[ "$host" =~ ^[0-9]+$ ]]; then
local host_name
host_name=$(grep -E '^Host ' "$config_file" | awk '{print $2}' | grep -v '^#' | sed -n "${host}p")
if [ -n "$host_name" ]]; then
if [[ -n "$host_name" ]]; then
ssh -F "$config_file" "$host_name"
else
echo "Invalid number." 1>&2