Funktion innerhalb einer if-Konstruktur oeffnen! (zsh, bash)

marcelcedric

Commodore
Registriert
Mai 2003
Beiträge
4.342
Hi,

Hab hier gerad ein Problem. Will eine Funktion innerhalb einer if-Konstruktion oeffnen.

#!/bin/sh

MENU=$($DIALOG --stdout --clear --title "$NP" \
--menu "hier...der...text..." 15 65 4 \
"Wired" "Configure the Wired-Device" \
"Wireless" "Configure the Wireless-Device" \
"Austrian" "Austrian Internet Providers" \
"Exit" "Exit this program")

retval=$?

case $retval in
0)
if [ $MENU == Austrian ]; then
-> Wie austrian() oeffnen?!
fi
... weitere if-konstruke
esac

austrian() {
echo hi
}

mfg
 
Hat sich erledigt. ->

#!/bin/sh

austrian() {
echo hi
}


MENU=$($DIALOG --stdout --clear --title "$NP" \
--menu "hier...der...text..." 15 65 4 \
"Wired" "Configure the Wired-Device" \
"Wireless" "Configure the Wireless-Device" \
"Austrian" "Austrian Internet Providers" \
"Exit" "Exit this program")

retval=$?

case $retval in
0)
if [ $MENU == Austrian ] && austrian

... weitere if-konstruke
esac

MfG
 
Zurück
Oben