05-12-2005
Ice,
If you are executing temp log files for this, there is no need to create /tmp/c.complete.
Change your scenario as,
a.sh
...
...
touch /tmp/a.complete
b.sh
#! /bin/ksh
[ ! -f /tmp/a.complete ] && exit
...
...
rm -f /tmp/a.complete
touch /tmp/b.complete
c.sh
#! /bin/ksh
[ ! -f /tmp/b.complete ] && exit
...
...
rm -f /tmp/b.complete
But default way is to $? to get the status of script execution. Return on every script with success and failure with exit 0 or exit 1 so that you can keep track with $? variable.
sh a.sh
if [ $? -eq 0 ]
then
sh b.sh
if [ $? -eq 0 ]
then
sh c.sh
fi
fi
you can add more lines to keep tack log information.
hth.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
We use Sun Volume manager to mirror root disks and other local disks...
Is there any script to monitor raid status across all machines send output thru email?
Help is appreciated.
Thanks. (1 Reply)
Discussion started by: sriny
1 Replies
2. Shell Programming and Scripting
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies
3. Shell Programming and Scripting
Hi,
We put cron entry :whenever server is offline(checks every 5 minutes) it sends status to mailer group.
The number of messages (offline)were growing in our mailbox.How to avoid not to send offline messages after the first one through shell script.
Thanks in advance.
Chowdary (2 Replies)
Discussion started by: chowdary_m
2 Replies
4. Shell Programming and Scripting
Dear Members,
I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc.
I would like to create a script which will will call other scripts based on the request action.
Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies
5. AIX
Hi
Script not getting executed via cron but executes successfully when executed manually. Please assist
cbspsap01(appuser) /app/scripts > cat restart.sh
#!/bin/ksh
cd /app/bin
date >>logfile.out
echo "Restart has been started....." >>logfile.out
date >>logfile.out
initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies
6. UNIX for Advanced & Expert Users
Hi,
I am looking for a script wherein i will be able to execute below procedures one by one in line and next procedures starts only when the previous one completes and also after execution of each procedure i will be getting a automted mail as "PL/SQL PROCEDURE SUCCESSFULLY EXCETUTED".
... (1 Reply)
Discussion started by: sv0081493
1 Replies
7. Shell Programming and Scripting
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Discussion started by: Madhu Siddula
1 Replies
8. Shell Programming and Scripting
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
Discussion started by: Madhu Siddula
6 Replies
9. Shell Programming and Scripting
Hi Team,
I have a increamental file like :
1033|20160120211644126508|1845828861|IN PROGRESS|
1033|20160120220756541604|1845828861|IN PROGRESS|
1033|20160120221051036757|1845828861|IN PROGRESS|
1033|20160120221208839263|1845828861|IN PROGRESS|
1033|20160120222550394230|1845828861|IN... (1 Reply)
Discussion started by: D_Sethi
1 Replies
10. Solaris
Hi All,
I am new to this forum and I am hoping someone will be able to help me:)
I have inherited a very old Solaris server that has a number of scripts around 500 in total.
I need to migrate the scripts to Linux but I would like to know which ones are currently being executed rather... (10 Replies)
Discussion started by: josamy
10 Replies
LEARN ABOUT DEBIAN
dh_movefiles
DH_MOVEFILES(1) Debhelper DH_MOVEFILES(1)
NAME
dh_movefiles - move files out of debian/tmp into subpackages
SYNOPSIS
dh_movefiles [debhelperoptions] [--sourcedir=dir] [-Xitem] file...]
DESCRIPTION
dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp or some other directory and into other package
build directories. This may be useful if your package has a Makefile that installs everything into debian/tmp, and you need to break that
up into subpackages.
Note: dh_install is a much better program, and you are recommended to use it instead of dh_movefiles.
FILES
debian/package.files
Lists the files to be moved into a package, separated by whitespace. The filenames listed should be relative to debian/tmp/. You can
also list directory names, and the whole directory will be moved.
OPTIONS
--sourcedir=dir
Instead of moving files out of debian/tmp (the default), this option makes it move files out of some other directory. Since the entire
contents of the sourcedir is moved, specifying something like --sourcedir=/ is very unsafe, so to prevent mistakes, the sourcedir must
be a relative filename; it cannot begin with a `/'.
-Xitem, --exclude=item
Exclude files that contain item anywhere in their filename from being installed.
file ...
Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory
will be moved. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in.
NOTES
Note that files are always moved out of debian/tmp by default (even if you have instructed debhelper to use a compatibility level higher
than one, which does not otherwise use debian/tmp for anything at all). The idea behind this is that the package that is being built can be
told to install into debian/tmp, and then files can be moved by dh_movefiles from that directory. Any files or directories that remain are
ignored, and get deleted by dh_clean later.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
9.20120909 2012-05-19 DH_MOVEFILES(1)