Linux shell scripting on cluster using sun grid Engine
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.
Linux shell scripting on cluster using sun grid Engine
Good day ..i am a student and i am been trying to experiment by writing a shell scripting using SGE commands & awk &sed commands without any success .the script has to output system statistics eg the types of queues (Jobs Available,Jobs Waiting ,Jobs Errors) and the quota ..it has to display when the user log on the cluster .it has to be a summary ..the main aim the user doesnt have to use qstat command when he is on the cluster ,the script has to simplify the users work
even if the script doesnt use other commands as long i can try to get ideas or script that can give me the output i want ..please help
Please don't make multiple posts. Choose one forum that you think best fits your topic. If you've accidentally posted to the wrong forum, use the "report" button and ask a moderator to move it for you.
Second, you need to provide some details. At the very least post the relevant parts of the script you're working on. Since this appears to be a homework assignment, you're not going to get any spoon-fed answers, but we can help guide you to a working solution.
Thanks for the guidance ,its my first time posting a question.Secondly its not a school assignment,its sumthing (little Project) i am trying to work on to help me learn Shell scripting ,Linux and Sun Grid Engine
Please put large blocks of code inside [code][/code] tags, so that the formatting doesn't get lost and it doesn't break the layout of the page.
Now I have no experience with qstat (or any of the others you're calling) or what the output looks like. I'd have to see some example output in order to fully understand what you're trying to extract.
But from a first glance, it looks like you're calling these various "q*" commands over and over again in order to get different values. I think, if it's possible, that it would be much more efficient to get all of your output at once and store it in a variable or two (or perhaps an array). Try to combine as many operations as possible into a single command. Then you can parse those variables for the information you want and store the values in variables too. Then you can create a final output form that will print those variables in a readable fashion. You might want to create separate functions for each of these processes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.