The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Removal of at and batch jobs palash2k UNIX for Dummies Questions & Answers 1 10-16-2008 06:21 AM
How does the internal commands are executed? chaitra UNIX for Dummies Questions & Answers 2 07-22-2008 06:25 AM
whole day commands executed by particular user naree SUN Solaris 1 03-05-2008 06:45 AM
I want to know whole day commands executed by particular user naree SUN Solaris 3 03-04-2008 04:55 AM
Deleting a batch of print jobs orvelb UNIX for Dummies Questions & Answers 1 02-09-2001 12:20 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-18-2009
faizlo's Avatar
faizlo faizlo is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 11
commands to be executed in order for a batch jobs!

Hi All,

I am trying to run this script. I have a small problem:
each "./goada.sh" command when done produces three files (file1, file2, file3) then they are moved to their respective directory as can be seem from this script snippet here.

The script goada.sh sends some commands for some calculations as jobs to a certain system. These jobs run in parallel with each others and produce their outputs to the same directory.

The produced files from each run of "goada.sh" will have the same name and they will be overwritten by each other.

The only thing I could come up with is to look for a command that will make sure that each line of the script will be executed, if and only if the previous command is executed. Is this possible?


Code:
#!/bin/sh

./clean.sh

mkdir adabdt/bdt01
mv *.root adabdt/bdt01/
mv *.spr adabdt/bdt01/
mv *.log adabdt/bdt01/

mkdir adabdt/bdt02/
sed -i -e "s/-l 50/-l 100/" adaBDT01.sh
sed -i -e "s/-l 50/-l 100/" adaBDT02.sh
sed -i -e "s/-l 50/-l 100/" adaBDT03.sh
nohup ./goada.sh > anything


./clean.sh
mv *.root adabdt/bdt02/
mv *.spr adabdt/bdt02/
mv *.log adabdt/bdt02/

mkdir adabdt/bdt03/
sed -i -e "s/-l 500/-l 1000/" adaBDT01.sh
sed -i -e "s/-l 500/-l 1000/" adaBDT02.sh
sed -i -e "s/-l 500/-l 1000/" adaBDT03.sh
nohup ./goada.sh > anything

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0