On Apr 30, 2007, at 4:37 PM, Eduardo Sanz Garcia wrote:

> This statment works well on linux:
> sed s/e/a/ -i hello.txt
> hello.txt is edited in place.
>
> Why is sed not doing the same on macs?
> [lynx:~] esanzgar% sed s/e/a/ -i hello.txt
> *sed: -i: No such file or directory*
>
> hallo
>
> Thank you very much.

sed is expecting the option -i to come right after the command name.  
It also requires an extension to use for a backup file. Try this:

sed -i bak 's/e/a/' hello.txt

-Peter
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to