05-12-2005
Quote:
Originally Posted by muthukumar
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.
this is ok if the scripts are run sequentially by 1 script using 1 log file ... the code i offered is to fullfill the independent script run requirement ...
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 CENTOS
xfs_estimate
xfs_estimate(8) System Manager's Manual xfs_estimate(8)
NAME
xfs_estimate - estimate the space that an XFS filesystem will take
SYNOPSIS
xfs_estimate [ -h ] [ -b blocksize ] [ -i logsize ]
[ -e logsize ] [ -v ] directory ...
xfs_estimate -V
DESCRIPTION
For each directory argument, xfs_estimate estimates the space that directory would take if it were copied to an XFS filesystem. xfs_esti-
mate does not cross mount points. The following definitions are used:
KB = *1024
MB = *1024*1024
GB = *1024*1024*1024
The xfs_estimate options are:
-b blocksize
Use blocksize instead of the default blocksize of 4096 bytes. The modifier k can be used after the number to indicate multiplica-
tion by 1024. For example,
xfs_estimate -b 64k /
requests an estimate of the space required by the directory / on an XFS filesystem using a blocksize of 64K (65536) bytes.
-v Display more information, formatted.
-h Display usage message.
-i, -e logsize
Use logsize instead of the default log size of 1000 blocks. -i refers to an internal log, while -e refers to an external log. The
modifiers k or m can be used after the number to indicate multiplication by 1024 or 1048576, respectively.
For example,
xfs_estimate -i 1m /
requests an estimate of the space required by the directory / on an XFS filesystem using an internal log of 1 megabyte.
-V Print the version number and exits.
EXAMPLES
% xfs_estimate -e 10m /var/tmp
/var/tmp will take about 4.2 megabytes
with the external log using 2560 blocks or about 10.0 megabytes
% xfs_estimate -v -e 10m /var/tmp
directory bsize blocks megabytes logsize
/var/tmp 4096 792 4.0MB 10485760
% xfs_estimate -v /var/tmp
directory bsize blocks megabytes logsize
/var/tmp 4096 3352 14.0MB 10485760
% xfs_estimate /var/tmp
/var/tmp will take about 14.0 megabytes
xfs_estimate(8)