Skip to content

Instantly share code, notes, and snippets.

@dewomser
Created April 20, 2025 04:09
Show Gist options
  • Save dewomser/915957a7f3ed2d6cceca661f2301be1c to your computer and use it in GitHub Desktop.
Save dewomser/915957a7f3ed2d6cceca661f2301be1c to your computer and use it in GitHub Desktop.
Einfaches Menue-Skript für Bash in Bash . Kommandos starten über Eingabe von Zahlen
#!/bin/bash
# Menue für Bash in Bash. Kommandos staerten mit Zahlen
# Liste von Befehlen
commands=("ls -rtl" "ssh [email protected]" "htop" "history" "cmatrix" "calendar" "neofetch" "ping 192.168.1.1" "toilet" "bpytop" "asciiquarium" "cowsay lolo")
# Hauptmenüschleife
while true; do
echo "Wähle einen Befehl aus der Liste aus:"
select cmd in "${commands[@]}"; do
if [ -n "$cmd" ]; then
# ausgewählten Befehl ausführen
$cmd
break
else
echo "Ungültige Auswahl. Bitte versuche es erneut."
fi
done
done
@dewomser
Copy link
Author

Bildschirmfoto_20250420_043930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment