Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Rep:
Zenity If else statement question?
Hi guys,
I'm currently using zenity to write a proram that will display a radiolist, and then based off of your answer to the radio list display a set of question for the box that appears after it. For example it will first ask you who want to learn about either DOGS or CATS, if you say cats it will show you all types of cats like tabby, persian etc. However if you say dogs it will show you a different zenity radiolist which shows german spheards, golden receiver, etc. Is there anything like a if then statement I can use withen xenity to accomplish this task?
I would really appreciate anyones help, below is what I have so far:
I don't think you are going to run an "if" construct inside of Zenity. My hunch is that you want a "case" construct which takes the output of one Zenity call and uses it to determine the structure of the next call.
If you don't already have it, go to http://tldp.org and get the Bash Guide for Beginners and Maybe also the Advanced Bash Scripitng Guide.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
Case Construct
Quote:
Originally Posted by pixellany
Welcome to LQ!!
I don't think you are going to run an "if" construct inside of Zenity. My hunch is that you want a "case" construct which takes the output of one Zenity call and uses it to determine the structure of the next call.
If you don't already have it, go to http://tldp.org and get the Bash Guide for Beginners and Maybe also the Advanced Bash Scripitng Guide.
Hi, Thank you for your reply, I can't seem to find anything on case constructs =(
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.