I am trying to understand a shell script that uses sed. I found that there were some places where sed was invoked with the -e option.
I tried to see the man page and it just mentions,
-e command
Append the editing commands specified by the command argument to the list of commands.
which is not very clear to me.
Can someone kindly explain to me what the -e does? Thanks.
PS: I am using sed in mac
1 Answer
The -e parameters tells sed that you wish to supply multiple commands:
sed -e 's/string1/string2/g' -e 's/string4/string5/g'This will replace string1 with string2 and string4 with string5.
4