The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to create a process chanikya UNIX for Advanced & Expert Users 4 04-16-2008 04:29 PM
UID & GID of the running process ankurjain UNIX for Dummies Questions & Answers 2 01-09-2008 06:33 AM
How to create constantly running process bhakti High Level Programming 1 08-24-2006 06:38 PM
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 11 07-12-2005 12:49 AM
Running Process Deepa High Level Programming 2 05-15-2002 06:46 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-30-2007
Registered User
 

Join Date: Aug 2007
Posts: 2
How to create a dummy process of a process already running?

Hi Everybody,

I want to create a shell script named as say "jip" and it is runned.
And i want that when i do ps + grep for the process than this jip should be shown as process.

Infact there might be process with name jip which is already running.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-30-2007
Registered User
 

Join Date: Aug 2007
Posts: 45
ps -ef |grep jip>/dev/null /* finds if there is one whith no verbose */
if [ $? -ne 0 ] /* if there is not executes jip */
then
jip
fi

Last edited by fazliturk; 08-30-2007 at 11:30 PM.
Reply With Quote
  #3 (permalink)  
Old 08-31-2007
Registered User
 

Join Date: Aug 2007
Posts: 2
Quote:
Originally Posted by fazliturk View Post
ps -ef |grep jip>/dev/null /* finds if there is one whith no verbose */
if [ $? -ne 0 ] /* if there is not executes jip */
then
jip
fi
Infact i didn't get you.
My concern is to create a simple shell script name say "jip".
Ofcourse there are other jip process which are running in the background.which are generally stopped by another shell script (say stop.sh).

My concern is to check for multiple jip process which are left running even after "stop.sh" is executed.
So i want to change the stop.sh but inorder to visualize whether the modification is working fine or not, i have to check it .And this can be achieved if only there are multiple jip process.

So i want to create a shell script which when runned should be viewed in the ps + grep of jip.

But i am not been able to do it.

I have created a file with the name jip.sh, where an infinite loop is running, but then also it is not viewed when i do grep for the "jip" process.

Can u please help me out from this. ?
Reply With Quote
  #4 (permalink)  
Old 08-31-2007
Registered User
 

Join Date: Aug 2007
Posts: 45
As much as I understood .You want to see your background process named something with ps ;

ps -ef |grep processname gives this.

there is no need to infinite loop. just;

echo "input someting : \n "
read input1
echo $input1

untill you input anything process waits.when you enter finishes.while waiting input you can check the process in on other screen. and you can start multiple processes.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0