Dialog Frage
Volker Gueth
vgueth at uni-bielefeld.de
Sun Sep 6 19:40:24 CEST 1998
On Sun, Sep 06, 1998 at 04:43:52PM +0000, Alexander Reelsen wrote:
> Moin...
>
> Ich hab hier mal ne dialog frage:
>
> dialog --yesno "Bla" 0 0 2>/tmp/file
>
> schreibt nix in /tmp/file. Wie also kann ich das Ergebnis von --yesno
> einlesen (und auswerten natuerlich)??
Ich hab zwar noch nichts mit dialog gemacht, aber es liegt ein sample
file dabei:
---------------------------------------------------------------------
#!/bin/sh
DIALOG=${DIALOG=../src/dialog}
$DIALOG --title "YES/NO BOX" --clear \
--yesno "Hi, this is a yes/no dialog box. You can use this to ask \
questions that have an answer of either yes or no. \
BTW, do you notice that long lines will be automatically \
wrapped around so that they can fit in the box? You can \
also control line breaking explicitly by inserting \
'backslash n' at any place you like, but in this case, \
auto wrap around will be disabled and you will have to \
control line breaking yourself." 15 61
case $? in
0)
echo "Yes chosen.";;
1)
echo "No chosen.";;
255)
echo "ESC pressed.";;
esac
-------------------------------------------------------------------------
Sieht nicht so kompliziert aus oder?
cu Volker
More information about the Linux
mailing list