bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-ncurses] Getting $@ to work from script


From: Dr. Werner Fink
Subject: Re: [bug-ncurses] Getting $@ to work from script
Date: Wed, 19 Dec 2012 10:13:18 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 19, 2012 at 07:09:53AM +1000, Michael D. Setzer II wrote:
> Do get the parameters from your original script had to change the 
> $@ with `echo address@hidden to have it built into the created script.
> 
> Also, dialog seems to be able to display all text if you can widen 
> the terminal screen as with gnome-terminal, but not sure if you 
> have a fixed screen that can not be resized.
> 
> 
> #!/bin/bash
> echo "dialog --clear --backtitle \"Node Management\" --title \"Nodes `echo 
> address@hidden"  --no-collapse --radiolist \"text\" 0 0 0 \\" >testdialog
> echo \" TEXT OPTION\" \"Status as of 20120-06-12\" "off" \\ >>testdialog
> #for a in `ls | grep -v \ | grep -v \&` 
> #do 
> #  echo \" $a\" \"Status\" "off" \\  >>testdialog 
> #done
> echo "\" internal/house/customers/abc\""             "\"online        Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" internal/house/customers/abcdefgh\""        "\"online        Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" internal/offsite/customers/abc\""           "\"unknown       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcd\""            "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcde\""           "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdef\""          "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdefg\""         "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdefgh\""        "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdefghi\""       "\"maintenance   Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdefghij\""      "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "\" external/house/customers/abcdefghijk\""     "\"offline       Some 
> description, long, long, stops here\"" off \\>> testdialog
> echo "2>result.out" >>testdialog
> gedit testdialog
> ./testdialog
> gedit result.out

I would suggest using mktemp(1) for the input as well
as for the output file.  Or instead of using an output
file for the result on stderr from dialog a line like

   result=$((. $tmp 1>/dev/tty) 2>&1)


Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

Attachment: x
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]