dialog --radiolist with list from file to choose not working
Hello,
I am trying to write a dialog UI for a script I use to save me from typing infinite commands each time. Now I don't get this part of it to work: There is a directory with several files. I create a list which contains *.gds files only, and I print only the name of them to the list. Code:
ls -al $DIR | grep .gds | gawk -F ' ' '{print $9} > $LIST Code:
dialog --radiolist I still think it's a formatting problem of my list. Any ideas how this should be done? Thank you |
For the radiolist option, it should something as such:
Code:
dialog --backtitle "Test" --radiolist "Select option:" 15 35 3 \ Cheers, Josh |
OK, I tried it out again and put following to a file
Code:
1 "Test 1" off \ Code:
dialog --backtitle "Test" --radiolist "Select option:" 15 35 3 \ Seems I tried too long last night and messed up something with my list and the format was not proper. I should go to sleep earlier :rolleyes: Thank you very much, I should have figured out myself :hattip: |
Honestly, I would have gone another route, but hey, if that works, and you understand it, then by all means use it. Cheers though on figuring it out!
Josh |
Could you please enlighten me :Pengy:
:hattip: |
Sure thing. I am leaving to go home soon from work, so sometime later on I will get on and explain by what I mean.
Cheers! |
Hi wargus. Here is an old post of mine which seems on topic with your concept: http://www.linuxquestions.org/questi...ove%5D-378279/
Care to post your final script here. ppd |
Hi PDock
well I simply try to create a UI for a script which generates a 3D view from a gds-file (microchip layout). The command needs many arguments each time and it's annoying to type them every time. Additional to the gds-file it needs two special files, depending on the technology used in the gds. So I make the user chose it one by one, but I don't like the --fselect dialog so I was to list the content of a directory and pass it to the --radiolist dialog. At the end I messed up the format of the input file. I am teaching myself shell scripting and any input from other scripts is welcome, to learn and steal a bit :p Mostly, big scripts are not easily readable for me because of the many nested variables they contain and the lack of in-script documentation. |
Instead of writing your options to a tmp file why not use a variable like this
Code:
echo $DIALOGDATA|xargs dialog --separate-output --checklist "Select Tags To Change" 0 0 0 P.S. quotes should be escaped like so Code:
DIALOGDATA="1 \"Test 1\" off 2 \"Test 2\" on 3 \"Test 3\" off" |
Thank you KH for the input, I need to learn about xargs anyway earlier or later...
:hattip: |
All times are GMT -5. The time now is 06:12 PM. |