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
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
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
Thanks very much