The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-31-2007
shambhu shambhu is offline
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.
  #2 (permalink)  
Old 08-31-2007
fazliturk fazliturk is offline
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-31-2007 at 02:30 AM..
  #3 (permalink)  
Old 08-31-2007
shambhu shambhu is offline
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. ?
  #4 (permalink)  
Old 08-31-2007
fazliturk fazliturk is offline
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 09:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0