![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Questions on GREP command | stevefox | UNIX for Dummies Questions & Answers | 11 | 12-25-2007 12:48 AM |
| how to exclude the GREP command from GREP | yamsin789 | UNIX for Advanced & Expert Users | 2 | 10-04-2007 11:59 PM |
| Make grep -c display like grep -n? | Jerrad | Shell Programming and Scripting | 2 | 08-24-2006 09:20 PM |
| grep questions | bobo | UNIX for Dummies Questions & Answers | 8 | 07-20-2006 01:20 PM |
| Simple grep questions | nitin | UNIX for Dummies Questions & Answers | 2 | 10-14-2001 09:52 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello every one, I have read a little about SED and GREP but I do not know how to do this:
Using SED or GREP: "reverse all three letter words" "replace the last two digits in any string of digits by zeros (0)" "remove lines that start and end with the same word" and I have more like these but the book just explains the simple stuff. Thanks in advance. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
This looks like homework, so I'm not going to provide answers.
I do have some links to sed related pages, take a look there. Sed Tutorials: http://sed.sourceforge.net/grabbag/tutorials/ The Awful Truth about sed: http://www.grymoire.com/Unix/Sed.html sed.sf.net (looks a bit messy, but a lot of info): http://sed.sourceforge.net/ I bet the answers to all sed related questions are there. man grep will give you all the info you need for grep related things. Hope this helps.
__________________
The dead stay dead and the living only wait to join them........ |
|
#3
|
|||
|
|||
|
No is not homework. These are questions from past midterms where 30 became "C"s in one nasty curve.
Thanks for the links!!! |
|
#4
|
|||
|
|||
|
Is there a fast and dirty way to use all these commands.
Thanks!!! |
|
#5
|
||||
|
||||
|
The rule is:
(6) Do not post classroom or homework problems. I don't see an exception for questions from past midterms. |
|
#6
|
||||
|
||||
|
Re: Unpratical SED and GREP questions
"remove lines that start and end with the same word"
awk '$1 != $NF' yourFile > newFile As you can see, these aren't necessarily "tough" examples. You must've picked up a very general book if it doesn't talk about how to do if/else statements with awk and sed. |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|