Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Dialog helper, Bash scripting guidance needed.< Next Oldest | Next Newest >
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: Oct. 15 2007,13:46 QUOTE

Thanks to WDef now my script works almoost pefectly.
I have now one problem. Sometimes I need to show ASCII graphics in dialog or any text that has multiple spaces in a row. It seems that dialog (I don't know about whiptail) removes any extra spaces. Any Idea how to left these spaces there?

EDIT: A-ha! --no-collapse switch will do the thing. ;)

http://zelan.zapto.org:8888/dialog.png
I'll have to test with whiptail also to make this work in DSL also. ;)


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: Oct. 15 2007,20:25 QUOTE

You can make your script read argument text by calling your msgboxDialog function so:

Code Sample
msgboxDialog "$( echo -e "${1}" )"




Then try (eg):

Code Sample
./zuccacript.sh "1 2 3 \n 4 \n 5 \n 6 \n blah blah"



EDIT: Note this preserves whitespace in the argument string without  --no-collapse option to dialog/whiptail, which isn't recognized by dsl's version anyway.
Back to top
Profile PM 
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: Oct. 16 2007,20:55 QUOTE

Do you guys have any suggestions where should this hmmm... script library (?) to be located in system.
Somewhere in /usr/share?


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Oct. 16 2007,20:57 QUOTE

/usr/share/doc?

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: Oct. 16 2007,23:02 QUOTE

It's rather a shared library.
You can 'include' it in a bash script with source command.


--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
11 replies since Oct. 03 2007,13:35 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: Dialog helper

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code