The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
if statement ramky79 Shell Programming and Scripting 6 05-29-2008 12:17 AM
IF Statement koti_rama Shell Programming and Scripting 3 04-29-2008 01:48 AM
If statement - How to write a null statement april Shell Programming and Scripting 3 04-16-2008 10:14 AM
using && in if statement .. jisha Shell Programming and Scripting 7 02-01-2008 04:52 AM
If statement mariner UNIX for Advanced & Expert Users 4 12-16-2004 04:21 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-21-2005
ust ust is offline
Registered User
 

Join Date: Feb 2005
Posts: 95
if statement

I have below program to find the process "orapp" and echo the result ,

if
xxxx
then
for x in `ps -ef |grep "orapp" |awk { print $2; }

do
echo $x
done
else
xxxx
fi

now if I want to add one more condition - if the IP address of the process
is 192.168.0.1 ( who -u |awk { print $8} , how can I mix these two
condition into one script ? thx.
Reply With Quote
Forum Sponsor
  #2  
Old 12-21-2005
ust ust is offline
Registered User
 

Join Date: Feb 2005
Posts: 95
Quote:
Originally Posted by ust
I have below program to find the process "orapp" and echo the result ,

if
xxxx
then
for x in `ps -ef |grep "orapp" |awk { print $2; }

do
echo $x
done
else
xxxx
fi

now if I want to add one more condition - if the IP address of the process
is 192.168.0.1 ( who -u |awk { print $8} , how can I mix these two
condition into one script ? thx.
How can I combine the above two conditions into one script ? thx
Reply With Quote
  #3  
Old 12-21-2005
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
Please post the actual code that you have got so far. Also, please refrain from bumping up your post. That is against the rules.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:11 AM.


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

Content Relevant URLs by vBSEO 3.2.0