Shell--Dialog--Wo ist derFehler
Hallo ich bastele gerade ein wenig mit dialog rum...
Ich möchte für ein paar Server ein paar Commands hinterlegen das Ganze
soll etwa so aussehen:
-Server1
-Server2
-- ls
-- du....
War mir nicht parout nicht gelingen will ist das ich per menu andere
commands aufrufen
kann --- mit checklist etc gehts...
*#!/bin/sh
dialog --clear --title "Nr1" --menu \
'Manager' 10 70 4 \
'1' 'HOST1' \
'2' 'HOST2' \
'3' 'HOST3' \
'4' 'HOST4' 2> ~/tmp.$$
options=$(cat ~/tmp.$$)
rm ~/tmp.$$
for i in $options; do
case "$i" in
\"1\" ) ls -la;;
\"2\" ) script2;;
\"3\" ) script2;;
\"4\" ) scipt3;;
esac
done
--> Geht nicht!
*
Normalerweise soll STDOUT auf die Konsole geschrieben werden aber das
passiert nicht...
#!/bin/sh
dialog --clear --title "Nr2" --checklist \
'Manager' 10 70 4 \
'1' 'ls' off \
'2' 'du' off \
'3' 'date' off \
'4' 'pwd' on 2> ~/tmp.$$
options=$(cat ~/tmp.$$)
rm ~/tmp.$$
for i in $options; do
case "$i" in
\"1\" ) ls -la;;
\"2\" ) du -Sch;;
\"3\" ) date;;
\"4\" ) pwd;;
esac
done
--> Geht
Wie kann ich denn per dialog --menu andere Commands (zB ls, etc)
aufrufen....
Grüßle
Thomas
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Reply to: