Networking Forums

Networking Forums > Computer Networking > Linux Networking > Script to run a process

Reply
Thread Tools Display Modes

Script to run a process

 
 
mia456789@yahoo.com.hk
Guest
Posts: n/a

 
      01-25-2005, 02:33 PM
sorry to ask a script again,

I am not too understand shell script writing , could someone can help
me ,

I want to have a shell script for testing , the process will run
repeatly (looping), I want to test the CPU time , I have the below
script to test :

while x=0
do
cp /tmp/abc.txt /tmp/def.txt
done

the process is non-stop running , but it is not fit my requirement ,
because the above script will generate a new process after the old
process was completed , what I want is a SAME process is running
non-stop (same PID ) , could someone post a script for me ? thx in
advance.


I just want to have a script to run a process ( may be a looping ) ,
this process need to use the same PID . In my previous script , after
the cp process finished , it will generate another process ( so the
PID changed ) so not fit my requirement

could someone can post the script ? thx in advance.
 
Reply With Quote
 
 
 
 
Aru
Guest
Posts: n/a

 
      01-25-2005, 04:33 PM
script is as
-----------------------
lStart=1
lStop=10

while [ "$lStart" -le $lStop ]
do


sleep 100 #you can add this for time interval in each loop
done
-----------------------------

 
Reply With Quote
Reply

Thread Tools
Display Modes

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy files using filenames from text files with shell script or bash script altariamx2003@gmail.com Linux Networking 4 11-23-2006 08:27 AM
Not enough storage is available to process this command K-iS Windows Networking 2 09-04-2006 04:11 PM
Which process does dns requests? choowie Linux Networking 2 05-31-2006 06:58 PM
N3 Migration Process deanbo21@yahoo.co.uk Broadband 0 01-26-2006 02:10 PM
can't kill the process mia456789@yahoo.com.hk Linux Networking 1 12-16-2004 04:39 AM



1 2 3 4 5 6 7 8 9 10 11