basic sed question
I was reading this tutorial on SED (http://www.grymoire.com/Unix/Sed.html#uh-0) where it says that sed is line-oriented and that if you run sed 's/one/ONE/' <file, the change would only occur ONCE on a line.
The thing is, when I tested it, it changed every single occurrence on the whole line. Why is that? |
Ah, ok, I think I know the answer. It might be related to the fact that that's a UNIX tutorial, not a Linux tutorial, and that's the default behaviour for sed in UNIX.
|
Code:
df | sed 's/s/S/;q' |
All times are GMT -5. The time now is 10:51 PM. |