Results 1 to 5 of 5
That's right yet another stupid noob thread asking a stupid and pointless question
But if you could please take a split second to answer this simple (I think) question that ...
- 11-25-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
Noob linux command question
That's right yet another stupid noob thread asking a stupid and pointless question

But if you could please take a split second to answer this simple (I think) question that I have been trying to figure out for awhile...that would be awesome!
I'm sorting through a very large text file. I have sorted out which piece of information that I need via "cat, grep, awk" and I want to sort it better.
But the one word I'm "printing" out is enclosed with "( )" - how do I remove those damn parenthesis...I do not want them there?
my command thus far is:
cat people.txt | grep sam | grep address | awk '{print$1" "$2" "$3"}'
I get:
sam (xxx address) 55
I want:
sam xxx address 55
*I have tried messing around with sed, but I can't figure out the proper syntax*
btw, Happy Turkey day!
- 11-25-2010 #2
Can you post an example of an original line?
You must always face the curtain with a bow.
- 11-25-2010 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
You lost me at original line.
Do you mean like a line from the raw text file? If yes, then no I can't. At least not anytime soon.
- 11-25-2010 #4
Yes, from the raw text file.
I am not interested in actual data, just in the format.
Where are numbers, chars, spaces, etc.
Because it may be possible to simplify the command.
Anyway, you can strip the () with that
Code:| sed -e s/\(//g -e s/\)//g
You must always face the curtain with a bow.
- 11-25-2010 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
Awesome man! That did the trick
Exactly what I was looking for.
thanks again


Reply With Quote