In all the previous examples, we only applied one sed command to our stream. What about running multiple sed commands?
You can do that by using the -e option and separating the commands with a semicolon like this:
$ sed -e 's/First/XFirst/; s/Second/XSecond/' myfile
![](https://static.packt-cdn.com/products/9781788990554/graphics/assets/b52e69e1-6b89-44bb-a835-9783f777a7b7.png)
Also, you can enter every command on a separate line and you will achieve the same result:
$ sed -e ' > s/First/XFirst/ > s/Second/XSecond/' myfile
The sed command offers great flexibility; if you use it well, you will gain a lot of power.