Follow me on Twitter for my latest adventures!
I present to you my cheat sheet of sed, the Superman of stream editing! It has come handy 101 times for me because sed is not what I use daily and after some time of not using the sed commands tend to fade away from my mind and I have to review them quickly. This cheat sheet is ideal for that!
You can't really be a good hacker if you don't know this tool. I always love to think of various situations where knowing many, many different tools makes you the ultimate guru.
Suppose you had a situation where you were on a box which had some problems and the only tool available to you was sed, and you had to fix a configuration file problem really quickly or bad, bad things would happen. If you never knew sed, you'd be in deep trouble because it can't be learned from the man page, because it only lists all the commands and you have no understanding how the commands work.
When I first learned sed, I remember the joy when I understood how it worked, that it operated on input stream, output stream, pattern space and hold buffer. Once you know this, the rest can be understood from the man page, but before that, I doubt it.
This sed cheat sheet contains:
- command line summary
- command description, if they take single address or pattern, or a range of addresses, and what they modify (input stream, output stream, pattern space or hold buffer)
- command line argument summary
- short summary of adderss range format
If you notice any inaccuracies, mistakes or see that I have left something out, comment on this page, please!
Download Sed Stream Editor Cheat-Sheet
Download link: sed stream editor cheat sheet (.pdf)
Downloaded: 128218 times
Plain Text (.txt):
Download link: sed stream editor cheat sheet (.txt)
Downloaded: 36328 times
Microsoft Word 2000 format (.doc):
Download link: sed stream editor cheat sheet (.doc)
Downloaded: 6993 times
Are you interested in sed and unix text editing power tools? Here are three great books on this topic from Amazon: