Very new to Linux/Trying to understand the Sed command
I have tried to get the desired outcome and have failed.
the blue cat was chased by the brown dog the blue cat was not chased by the brown dog Line should read the blue snake was chased by the brown snake the blue car was not chased by the brown car. I got the first line, but the words to be substituted in the second line did not change. sed -e 's/cat/snake/' -e 's/dog/snake/' -e '/not/s/cat/car' -e 's/dog/cat/' I have read and found that sed does not handle long line of command, so is there some way to break this up. I tried to use pipe and \n. Very new to this. |
Hi -
No, the length of the line is not the problem. Quote:
Quote:
Quote:
Quote:
|
Thank you very much. Can you also try to help me understand this. I under the the first, second, and last expression. The third substitution has me stumped. -e 's/dog/cat'
I forgot to add the file name at the end of my line. I apologize for that. Thank you again. |
All times are GMT -5. The time now is 06:53 PM. |