hpr2060 :: Introduction to sed - part 5
Finishing covering sed commands. Looking at some example scripts
Hosted by Dave Morriss on Friday, 2016-06-24 is flagged as Explicit and is released under a CC-BY-SA license.
sed, stream editor, pattern space, hold space.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr2060
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 00:48:09
Learning sed.
Episodes about using sed, the Stream Editor. It's a non-interactive editor which you can use to make simple changes to data, which is how many people use it. However, sed also has a lot of hidden power, especially in the GNU version.
Introduction to sed - part 5
This episode is the last one in the "Introduction to sed" series.
In the last episode we looked at the full story of how sed
works with the hold and pattern buffers. We looked at some of the commands that we had not yet seen and how they can be used to do more advanced processing using sed
's buffers.
In this episode we will look at a selection of the remaining commands, which might be described as quite obscure (even very obscure). We will also look at some of the example sed
scripts found in the GNU sed manual.
To read the rest of the notes for this episode follow this link.
Links
- Introduction to sed - part 1: hpr1976
- Introduction to sed - part 2: hpr1986
- Introduction to sed - part 3: hpr1997
- Introduction to sed - part 4: hpr2011
- GNU
sed
manual:- Index: https://www.gnu.org/software/sed/manual/sed.html
- Commands for
sed
gurus: https://www.gnu.org/software/sed/manual/sed.html#Programming-Commands - Commands Specific to GNU
sed
: https://www.gnu.org/software/sed/manual/sed.html#Extended-Commands
- Wikipedia entry for
sed
: https://en.wikipedia.org/wiki/Sed - "Sed - An Introduction and Tutorial" by Bruce Barnett: https://www.grymoire.com/Unix/Sed.html
- Wikibooks sed wiki: https://en.wikibooks.org/wiki/Sed
- Example files:
- Using the c command: demo5.sed
- Centring lines: centre.sed
- Reverse lines of files: tac.sed
- Reverse characters of lines (original and debug): reverse_characters.sed
reverse_characters_debug.sed