LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-15-2006, 01:31 PM   #1
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Rep: Reputation: 15
kdialog --menu command


I have a bash variable with a kdialog command in it. I am having problems getting it to display correctly.
if i run the command straight from a shell it works perfect but from inside the script i cannot get it to display right. here is an example of the variable where the number is the value i want returned and the quoted text is the menu item:

kdialog --menu "What did you want:" 6766 "ribbit (frog sound)/ " 14560 "frog/ " 14561 "frogman/ " 19520 "red frog crab/ " 23000 "tree frog/ " 27076 "singing frog/ " 29587 "frog/(P)/ " 29588 "frog/ " 29592 "curved wooden support on top" 29593 "of) leapfrog/ " 29594 "leapfrog/ " 29595 "(n) curved wooden support on" 29596 "tree frog (toad)/ " 29909 "horned frog/ " 35404 "bullfrog/ " 67568 "green (tree) frog/ " 68077 "brown frog/ " 80272 "railway frog/ " 81100 "bullfrog/edible frog/ " 87114 "(game of) leapfrog/ " 87115 "leapfrogging/ " 90138 "(1) leaping/activity/(2) leapfrog (over a" 108614 "curved wooden support on top"


any ideas? thanks
 
Old 01-16-2006, 06:52 AM   #2
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
I can't reproduce your problem. I wrote this very small script:
Code:
TEST=$(.your complete kdialog command here.)
echo "awnser: "$TEST
and it worked perfectly...

greetz,
.-=~ iluvatar ~=-.
 
Old 01-17-2006, 01:37 PM   #3
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Original Poster
Rep: Reputation: 15
That doesnt seem to be working either. If you run through this set of commands you can see what i mean better.

jeff@linux:~> KDIALOGCOMMAND="kdialog --menu \"What did you want:\" a \"hi\""
jeff@linux:~> echo $KDIALOGCOMMAND
kdialog --menu "What did you want:" a "hi"
jeff@linux:~> `$KDIALOGCOMMAND`
jeff@linux:~> kdialog --menu "What did you want:" a "hi"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show a variable menu list in Kdialog? linx win Debian 1 11-26-2005 10:33 AM
Main menu command RedRaven Fedora 0 04-14-2005 12:53 AM
kdialog replacement Khabi Linux - Software 2 04-09-2005 01:10 AM
Variable info in kdialog? Klas Programming 1 01-08-2005 08:58 AM
menu item (command) to use root Tyir Linux - General 1 03-16-2004 09:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration