Results 1 to 2 of 2
I have a script that display some text like
pid=87 serial=6213 audsid=1161813 user: 102/AKSHAY
Can any one please help me. I want to grep , cut and display only the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-05-2008 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 18
How to GREP, cut and display a single word
I have a script that display some text like
pid=87 serial=6213 audsid=1161813 user: 102/AKSHAY
Can any one please help me. I want to grep , cut and display only the word "AKSHAY" on prompt not the whole line.
Please help me out of this
- 05-05-2008 #2Linux Enthusiast
- Join Date
- Apr 2004
- Location
- UK
- Posts
- 678
Cut splits the line on the '/' and prints the second field.Code:chris@angua:~$ echo pid=87 serial=6213 audsid=1161813 user: 102/AKSHAY | cut -d / -f 2 AKSHAY
Let us know how you get on,
Chris...To be good, you must first be bad. "Newbie" is a rank, not a slight.


Reply With Quote
