Solved

grep problem

Posted on 1997-06-09
3
449 Views
Last Modified: 2010-04-21
How can I obtain the item number X from a line returned by the command grep?
0
Comment
Question by:jjescri
3 Comments
 
LVL 22

Expert Comment

by:blu
ID: 2006384
Huh?  Please give an example.
0
 
LVL 1

Accepted Solution

by:
henrys earned 0 total points
ID: 2006385
pipe output of grep to awk
For example, to get the process ID from a `ps` listing:
% ps -ef | grep inetd | awk '{print $2}'  (SysV)
 ps -aux | grep inetd | awk '{print $2}'   (BSD)
0
 

Author Comment

by:jjescri
ID: 2006386
Thank you very much, U.henrys.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
pauing printer deamon in AIX 10 59
Vmware Vswitch  VS  Redhat  Bridge 1 106
problem creating new luks volume on new VM disk 5 88
mobaxterm not able to change directory 28 145
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question