![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| URL call from SHELL script | chengwei | Shell Programming and Scripting | 35 | 4 Weeks Ago 05:04 PM |
| call constructor of java class in script | thebladerunner | Shell Programming and Scripting | 1 | 4 Weeks Ago 12:23 PM |
| How to call Java by using shell script | aaabbb123123 | Shell Programming and Scripting | 2 | 08-20-2008 11:02 PM |
| How to call a shell script from awk ? | Amruta Pitkar | Shell Programming and Scripting | 1 | 04-20-2007 01:35 AM |
| how do i get my script to execute multiple commands? | hvincent | Shell Programming and Scripting | 1 | 04-26-2006 05:19 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I want to call multiple java commands through a .sh file. I have drafted one with my least knowledge. But its not working. Pls help. I am trying to run this from Sun Solaris (OS 5.10) server with 10g oracle database. echo \* starting script AUTORUN echo \* get the Monitor path Monitorpath= /export/home1/users/test/Script/ echo \*Stopping the Monitors curdir=`pwd` cd $Monitorpath $Monitorpath\java MonitorStopper -l echo \*Starting Project $Monitorpath\start "Project" java Project echo \*Starting Engine $Monitorpath\start "Engine" java Engine echo \*Starting Monitor $Monitorpath\start "Monitor" java Monitor echo \*Starting Escalation $Monitorpath\start "Escalation" java Escalation echo \*Starting ResponseMonitor $Monitorpath\start "Response" java ResponseMonitor I am trying to give start so that each one opens in different window (works in DOS). Is there any other command in unix for start? Regards, Vivek |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
What do you mean by "a different window"?
Do these java processes bring up GUIs? Or are they just outputting text and you want them each to run in a different terminal? Are you running X11? (Required if you want to open any additional windows - be it another terminal or a java GUI). Does "/export/home1/users/test/Script/start" actually exist? |
|
#3
|
|||
|
|||
|
Quote:
Thanks for the reply. My requirement is that when i run the first command then some of my existing processes will get killed. Then i need to start all the processes one by one. As you have mentioned, on running the command : start "Project" java Project through DOS, a new command prompt will come and the process will run in it and the name of the window will be Project. Similarly for the other commands also. So that means i want my ouput details to be shown in a new terminal for each java command. Ys the path "/export/home1/users/test/Script" do exist and in this path only the java files resides. Request you to give suggestions. |
|
#4
|
||||
|
||||
|
Quote:
Code:
#!/bin/sh echo "* starting script AUTORUN" echo "* get the Monitor path" Monitorpath= /export/home1/users/test/Script/ echo "*Stopping the Monitors" curdir=`pwd` cd $Monitorpath java $Monitorpath\MonitorStopper -l echo "*Starting Project" java $Monitorpath\Project & echo "*Starting Engine" java $Monitorpath\Engine & echo "*Starting Monitor" java $Monitorpath\Monitor & echo "*Starting Escalation" java $Monitorpath\Escalation & echo "*Starting ResponseMonitor" java $Monitorpath\ResponseMonitor & |
|
#5
|
|||
|
|||
|
My env details are as follows - Sun Solaris (OS 5.10) server with 10g oracle database.
I dont have any idea about X11. If this helps in opening multiple windows then what change in addition is required in the code you have given me now? |
|||
| Google The UNIX and Linux Forums |