The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to grep for a word and display only the word ananthmm UNIX for Dummies Questions & Answers 6 05-29-2008 05:00 AM
grep for word eltinator Shell Programming and Scripting 5 04-22-2008 05:07 PM
Should I use sed/ grep/awk for wrap file? vanda_25 Shell Programming and Scripting 6 05-04-2006 09:59 AM
word wrap in vi dangral UNIX for Dummies Questions & Answers 3 10-30-2002 10:45 AM
How to grep more then one word? roco UNIX for Dummies Questions & Answers 5 10-18-2002 07:43 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Apr 2008
Posts: 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
word wrap issue with grep

in my HP-Unix environment I continue to have issues seeing the whole file path when I do a grep

Example:

>ps -ef |grep test
>[process id, etc] /testpath/is/here/

should see:
>ps -ef |grep test
>[process id, etc] /testpath/is/here/not/here/test

Is there a setting to turn word wrap on/off? It works fine in our AIX environments...

TIA
Andrew
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-30-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,275
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
from the pas man page the section on args (what is truncated for you )
Quote:
args The command line given when the process was
created. This column should be the last one
specified, if it is desired. Only a subset of the
command line is saved by the kernel;
as much of
the command line will be displayed as is
available. The output in this column may contain
spaces. The default heading for this column is
COMMAND if -o is specified and CMD otherwise.

Reply With Quote
  #3 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 378
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Unlike AIX on HP-UX one needs to supply the -x switch (x for eXtended) in order to display the entire process line.

Code:
ps -efx
Reply With Quote
  #4 (permalink)  
Old 04-30-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,275
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
AFAIK - even with -x it still is not guaranteed to show the entire command line.
Reply With Quote
  #5 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 378
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by jim mcnamara View Post
AFAIK - even with -x it still is not guaranteed to show the entire command line.
Yes -x does not guarantee to show the entire command line unless it is less than or equal to 1K. Check it out here
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:12 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101