Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
-Make the name inputted in the first entry of the first zenity form prompt appear on the question prompt (P4)
-When I say No on the question prompt(P4) it should redirect me to P5 to show emplist.txt
-When I say yes on the question prompt(P4) it should redirect back to P1 to make another account
-Ok/Cancel should close P5 when pressed
-P2 and P3 should stdout to emplist.txt WITHOUT making a new line and adding to P1s line
Hello
I made this code for a zenity program and need help accomplishing some tasks.
In short I need to:
-Make the name inputted in the first entry of the first zenity form prompt appear on the question prompt (P4)
-When I say No on the question prompt(P4) it should redirect me to P5 to show emplist.txt
-When I say yes on the question prompt(P4) it should redirect back to P1 to make another account
-Ok/Cancel should close P5 when pressed
-P2 and P3 should stdout to emplist.txt WITHOUT making a new line and adding to P1s line
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
Habitual - Its an assignment lol
rtmistler - Okay I deleted the original pictures of the questions and just left the questions I have about the code.
What you've written is not a working script, it is a handful of variable assignments and nothing further.
You need to determine how you can see the output of your first zenith command, to get it to the shell script. Once you know that, you can assign that to a variable and test the variable. You may end up needing to save it to a variable using some other means, for instance capturing the data from stdin as a user enters it.
My signature has a few BASH script references to aid you in better understanding BASH scripting. I also have a blog entry which talks about some ways to debug your scripts.
Some suggestions are to (1) remove the loop and all the following commands and just worry about the first command (2) remember that anything you can type and run from the terminal command line, you can put into a BASH script, and likewise any returns or status you get back you can save as a variable and test withing the BASH script (3) please put in some additional effort to find out how to get the desired output from your first command, I do not have or use zenith and therefore can only assess the flow of your script, which as I've said presently, does not have a flow, it is instead an infinite loop of variable definitions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.