Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED][OT]Bash i dialog "--menu"
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
nmap
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2004
Posts: 122
Location: /dev/poznan/debiec

PostPosted: Sat Jan 29, 2005 8:53 pm    Post subject: [SOLVED][OT]Bash i dialog "--menu" Reply with quote

Mam problem pisze sobie takie proste skrypciki i chciałem zrobic takie wybierane menu .
W dokumentacji basha wyczytałem ze najlepsze do tego będzie --menu . Ale niestety nie potrafie teraz przekazać dalej tych wyborów do np. case czy jakiejs innej instrukcji

Code:

     dialog --title "--== MENU ==--" \
      --backtitle "Super okno" \
      --menu "Menu wyboru :" 20 20 7 \
      1 SSH  \
      2 FTP \
      3 HTTP \
      4 Wyjście


moze jakoś z tą zmienna tza pokombinować ?
$?

Pozdrawiam
_________________

FSF OpenBSD Open Source . You Have the Power !


Last edited by nmap on Sun Jan 30, 2005 8:55 am; edited 1 time in total
Back to top
View user's profile Send private message
Rav70
l33t
l33t


Joined: 11 Feb 2004
Posts: 607
Location: Poland

PostPosted: Sat Jan 29, 2005 9:12 pm    Post subject: Reply with quote

Poczytaj sobie źródła w /usr/doc/dialog-<wersja>/samples. Wynikałoby z nich że należy przekierować stderr do pliku lub zmiennej środowiskowej i z niego/niej odczytać wybór, natomiast z $? kod wyjścia - np. 1 dla naciśnięcia przycisku Cancel.
Pozdr. Rav
_________________
Q: Why is Microsoft's Product Support a failure?
A: Because Microsoft needs a Support Group instead.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum