Sponsored Content
Top Forums Shell Programming and Scripting Script calling another script not working Post 302486594 by tmiller on Sunday 9th of January 2011 12:32:54 PM
Old 01-09-2011
Script calling another script not working

Hi,

I'm new to this forum. I'm working on a Hyperion Essbase project and I'm responsible for the automation part of the piece. I am trying to execute 4 maxl script at the same time but it seem to be not working. Below is my script:
Code:
#!/bin/sh

# Maxl script to run
export MAXL_SCRIPT_1=/hyperion/..../script1.maxl
export MAXL_SCRIPT_2=/hyperion/..../script2.maxl
export MAXL_SCRIPT_3=/hyperion/..../script3.maxl
export MAXL_SCRIPT_4a=/hyperion/..../script4a.maxl
export MAXL_SCRIPT_4b=/hyperion/..../script4b.maxl
export MAXL_SCRIPT_4c=/hyperion/..../script4c.maxl
export MAXL_SCRIPT_4d=/hyperion/..../script4d.maxl
export MAXL_SCRIPT_5=/hyperion/..../script5.maxl

/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_1 "

wait
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_2 "

wait
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_3 "

wait
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4a " &
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4b " &
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4c " &
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4d " &

wait
/usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_5 "

echo Done.

Seem that it will only execute only two of the scripts randomly. It would sometime execute 4a & 4d and so forth. I need to have the script execute 4a, 4b, 4c, & 4d at the same time and then it would execute script 5 once all the script 4s are complete.

Any information to why it is just executing only 2 scripts and not all 4 scripts would be helpful.

Thanks in advance,
Tim


Moderator's Comments:
Mod Comment Please use code tags when posting data and code samples, thank you.

Last edited by Franklin52; 01-09-2011 at 01:48 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling current working dir from script

Hello, I am having problem in setting current working directory from shell. I want to set pwd as an environmental variable in a script. I am following an existing script which is defined as HOME=$(shell dirname `pwd`) C_HOME=$(shell echo $(HOME) | sed -e 's:\/:\\\/:g' ) But when I am trying... (3 Replies)
Discussion started by: chandra004
3 Replies

2. Shell Programming and Scripting

passing a variables value from the called script to calling script using ksh

How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ? I've given portion of the script here to explain the problem. Portion of Script 1 ============= ----- ----- tmp=`a.ksh p1 p2 p3` if then # error processing fi -----... (10 Replies)
Discussion started by: rajarkumar
10 Replies

3. Shell Programming and Scripting

Running a unix script(which is calling another script inside that) in background

Hi all, I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously. for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies

4. Shell Programming and Scripting

ssh is not working while calling through expect shell script

Hi, Please share you experience and way out on below error:--> #!/bin/bash -xv FILE=login.txt + FILE=login.txt CONNECT=sshlogin.exp + CONNECT=sshlogin.exp SERVERNAME=$1 + SERVERNAME=192.168.12.1 MyServer="" + MyServer= MyUser="" + MyUser= MyPassword="" + MyPassword= exec 3<&0 +... (6 Replies)
Discussion started by: manish_1678
6 Replies

5. Shell Programming and Scripting

Syntax error calling TCL script from shell script

hello everyone i am beginner on shell scripting .and i am working on my project work on ad hoc network i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem " syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies

6. Shell Programming and Scripting

Calling a Perl script in a Bash script -Odd Situation

I am creating a startup script for an application. This application's startup script is in bash. It will also need to call a perl script (which I will not be able to modify) for the application environment prior to calling the application. The problem is that this perl script creates a new shell... (5 Replies)
Discussion started by: leepet01
5 Replies

7. Shell Programming and Scripting

How we can pass the argument when calling shell script from perl script

Can someone let me know how could I achieve this In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies

8. Shell Programming and Scripting

calling a shell script present on another server using perl script.

Hi, I am working on a sever A. I want to write a perl script to execute a shell script persent on the server B. please help me in this. thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies

9. Shell Programming and Scripting

Calling shell script within awk script throws error

I am getting the following error while passing parameter to a shell script called within awk script. Any idea what's causing this issue and how to ix it ? Thanks sh: -c: line 0: syntax error near unexpected token `newline' sh: -c: line 0: `./billdatecalc.sh ... (10 Replies)
Discussion started by: Sudhakar333
10 Replies

10. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below. #masterscript.sh ./callingscript.sh echo $fileExist #callingscript.sh echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies
GZEXE(1)                                                      General Commands Manual                                                     GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe name ... DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files: -rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb -rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~ /usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are sure that /usr/bin/gdb works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy