Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How can I get rid of this error?

$
0
0
Hi, I have a quick question about sed and the r (read) command, whenever I use it on my mac I get an error that says
sed: \r: No such file or directory. Although the script works fine and behaves as it is intended, I would like to get rid of the pesky error message because I need to incorporate this command into a larger script and the error message tends to mess things up.
Here is an example of the script, I am also using the inplace option -i

Code:

sed -i '' -e '/InsertYourFileHere/ r /file-2' /file-1
I've read some where that mac sed does not support the read command is this accurate? Is there a way around this?
Thanks very much

Viewing all articles
Browse latest Browse all 16232

Trending Articles