Linux sed (stream editor) – part 2

Continuing from  part 1 of Linux Sed. If we want to run more than one sed's command on the text, we can use semicolons ';' or the -e . the structure is the following: sed -e '' -e '' Alternatively and more elegant is the semicolons  separator: sed '<command1>;<command2>;'  <fileName> Now let continue with the sed commands' list: … Continue reading Linux sed (stream editor) – part 2

Linux sed (stream editor) – part 1

Sed is a stream editor. We can use it to preform text transformation on input stream (regular file or input stream). The basic structure of sed is: sed <option> '<command>' <fileName> In this case it will change the file content according to the <command> and print it to the screen, the original file will be … Continue reading Linux sed (stream editor) – part 1