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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to insert and delete any line after desire line RahulJoshi Shell Programming and Scripting 4 10-20-2008 11:27 AM
sed: delete regex line and next line if blank one71 Shell Programming and Scripting 2 09-18-2008 06:53 AM
how to delete text from line starting pattern1 up to line before pattern2? repudi8or Shell Programming and Scripting 5 04-15-2008 10:25 PM
how to delete line with matching text and line immediately after orahi001 UNIX for Dummies Questions & Answers 6 01-15-2008 12:34 AM
delete a line based on first character of the line borncrazy UNIX for Dummies Questions & Answers 2 12-06-2005 03:27 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-28-2008
draco draco is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 38
Delete a line

Hi there all..

I have a question.
I create a array to count how many processes I have running of that particulair thing.

as in

Code:
set -A PROCCOUNT `ps -ex | grep ${PRO_NAME_A[0]} | grep ${PRO_NAME_B[0]} | awk '{print $4}'`

Now I also get my greps in as a result so it counts more when I want to dump it to the screen.

How can I make this line better so it would ignore the lines with grep in there?

If this is all unclear than tell me pls, than I post more of the script so you people know what I have build.

Many thanks in advance!
 

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 03:36 PM.


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