help for delaying command execution

2 views
Skip to first unread message

kingkhan

unread,
Jan 31, 2008, 8:09:06 AM1/31/08
to Linux Users Club India
while executing a script i need to delay execution of one command. @
present the system is skipping the result of command & executing the
next line. plz help me out . my script as follows

file name xyz.sh

echo --------------------------------------------------->>xyz.txt
echo --------------------------------------------------->>xyz.txt
ps -ef|grep KKK >>xyz.txt
fsfstatus >>xyz.txt
echo --------------------------------------------------->>xyz.txt
echo --------------------------------------------------->>xyz.txt


in this script am getting output only for ps -ef command & not for
fsfstatus as fsfstatus takes bit time, the script is skipping the
output of fsfstatus and executes echo i.e. next line. plz suggest wats
the appropriate command to troubleshoot this,i tried sleep & wait but
these are in vain.

Nilesh Barot

unread,
Feb 27, 2008, 5:23:46 AM2/27/08
to Linux Users Club India
Hi,

you can use sleep 600 to wait for 10 minutes...
adjust timing as per your requirement.


cheers
www.linuxforbeginners.info
www.linux4beginners.info
Reply all
Reply to author
Forward
0 new messages