Sequential execution of commands in ksh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sequential execution of commands in ksh
# 1  
Old 07-18-2013
Sequential execution of commands in ksh

I need to run few commands in a ksh script sequentially.
Some of the commands are jobs submitted to the server and the consecutive commands are dependent on the completion of the jobs submitted to the server.
It works if i separate the commands into different files like this
Code:
#!/bin/ksh
./source1
./source2

But can someone tell me how to achieve this in a single ksh script/file?
Thanks.

Last edited by prashob123; 07-19-2013 at 10:19 AM.. Reason: Well, those 2 lines were just what i intended to insert in the code section.
# 2  
Old 07-18-2013
You might be able to put the contents of both of those in one big file, but it depends on their contents.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl execution commands

I don't know to debug the program todaylive.pl program. plz someone let me know what are the commands I need to know to debug the perl programs to find out the error on it. (3 Replies)
Discussion started by: ramkumar15
3 Replies

2. Shell Programming and Scripting

Sequential Function Execution

I am having two different function in my script. When control is at first function I do not want to execute another function. How I can do that? Help is highly appreiated as I am not sure How I can do it in Unix? Thanks, Vikram. (2 Replies)
Discussion started by: VSom007
2 Replies

3. Shell Programming and Scripting

Execution of Shell Commands

I have a question: Where would I put the Command line (of any command) so that it executes every time I log on? Where would I put it if I want it to execute every time I start a new shell? (5 Replies)
Discussion started by: Nabeel Nazir
5 Replies

4. Programming

Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX

Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies

5. UNIX for Advanced & Expert Users

multiple commands execution

Hi i have 3 sql scripts that need to be executed simultaneously, and independent of one another, how do i do that in Unix AIX 5.3 (1 Reply)
Discussion started by: yschd
1 Replies

6. Shell Programming and Scripting

Problem while execution of second set of commands

Hi, I have a shell script with code . perf.env cd $QRY_DIR for SHELL_FILE in sql1 do export SNAME=$SHELL_FILE ${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} & RC=$(expr ${RC:-0} + $? ) sleep 60 if then echo sysdate>test1 echo query1.txt>>test1 grep -i... (0 Replies)
Discussion started by: ran16
0 Replies

7. Shell Programming and Scripting

Runnin Sequential commands

I hav 2 execute the following commmands in bash shell sequentially i can execute the following commands ie #mkdir /export/zone1 /export/zone1 #chmod 700 /export/zone1 #zonnefg -z zone1 this command has to change the propmpt as #zonecfg:zone1> only wen the prompt changes to... (5 Replies)
Discussion started by: silk_eye
5 Replies

8. UNIX for Dummies Questions & Answers

Sequential execution in shell script?

I've a shell script that invokes a URL of an application to do some work, e.g., http://www.abc.com/myservlet?action=helloworld.Does the shell wait for a return value from the URL call before proceeding to the next line of command? (6 Replies)
Discussion started by: chengwei
6 Replies

9. Shell Programming and Scripting

Sequential execution of job in cron

Hi I have a file say xyz.sh, whose contents are as follows : *************************** #! /bin/ksh set -x . /a.sh . /b.sh . /c.sh ***************************** Now will this execute all the three process simultaneously or sequentially? If it will process simultaneously, is... (3 Replies)
Discussion started by: pankajkrmishra
3 Replies

10. Programming

Reading special characters while converting sequential file to line sequential

We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies
Login or Register to Ask a Question