I love writing about programming, software development and computers. It's something I'm very passionate and excited about. So far I have written four books. I am writing three other books right now and I don't see myself stopping!

Awk One-Liners Explained

Awk One-Liners Explained teaches the basics of the Awk programming language through 70 short and well-explained Awk programs. These short programs are called one-liners. They fit on a single line and they perform one task really well. The tasks include numbering lines, joining lines, separating lines, printing columns, doing calculations, printing certain lines, deleting certain lines, replacing certain words and others.

Awk One-Liners Explained is based on my Awk One-Liners Explained article series that has been read over 1,400,000 times.

Sed One-Liners Explained

Sed One-Liners Explained teaches the sed Unix utility through 100 short and well-explained examples. These short programs are called one-liners. They fit on a single line and they do one task really well. The examples include numbering lines, printing certain lines, deleting certain lines, changing, deleting and replacing words and many others.

Sed One-Liners Explained is based on my Sed One-Liners Explained article series that has been read over 1,000,000 times.

Also I made the first chapter of the book freely available and called it World's Best Introduction to Sed. Take a look!

Perl One-Liners Explained

Perl One-Liners Explained teaches you how to become the shell ninja through 130 short and well-explained Perl programs called one-liners. Since there is more than one way to do it in Perl, I usually present several alternatives so the total number of various one-liners is over 200.

Perl One-Liners Explained is based on my Perl One-Liners Explained article series that has been read over 500,000 times.

Perl One-Liners

Perl One-Liners is my fourth book. It's published by No Starch Press and is based on my previous book Perl One-Liners Explained.

Perl one-liners are small and awesome Perl programs that fit in one line of code and do one thing really well. Perl One-Liners showcases 130 short and compelling lines of code that do all sorts of handy, geeky things like numbering lines in a file; generating random passwords; encoding, decoding, and converting strings; calculating factorials; even checking to see if a number is prime with a regular expression.

Read more about it in my announcement blog post Perl One-Liners has been published by No Starch Press.

Bash One-Liners Explained

Coming soon!

I've written the first 5 chapters so far:

I've another 5 chapters to finish, and once I'm done, I'll publish it as an ebook!

Practical Guide to Anonymity

Coming soon!

Vim Tricks

Coming soon!

What do people say about my books?

  • The author's light and humorous style is a great introduction to the power and productivity of one-liners. - gaj
  • Very nice tips and examples. Awesome language, awesome book. - bc
  • Lots of useful things I can harvest from this. It's fun and useful. - Brian Beckman
  • Well done, clear and concise. - Abraham Bloom
  • This book is a tinkerer's dream. You may find yourself turning to it again and again. - Michael Larsen
  • Very well-written book. - Steve
  • The author does a good job of explaining some fairly complicated things in layman's terms. - Joshua Rofrano
  • I didn't find anything to yell about. Given how much of a perfectionist bastard I am this is likely high praise. - Matt Trout
  • The author is enthusiastic about the material and uses an easy writing style. Highly recommended. - Jeremy Mates
  • Seriously, folks, CompSci 101 courses might be more fun with a book like this. - Thomas Maher


Nan Jia Permalink
May 23, 2013, 05:39

Why don't you create an ebook bundle including all these 3 ebooks with a discount, that is what I am looking for. ;)


May 23, 2013, 06:44

Can you just send me $19.90 to peter@catonmat.net via PayPal? I'll then have books sent to you.

$19.90 = price of perl book + sed book - awk book. :)

Elijah Beale Permalink
January 21, 2019, 13:14

Is this still a thing? I'd like to purchase the bundle. Been eyeing up your SED and AWK books on and off for years!

Elijah Beale Permalink
January 21, 2019, 13:15

Also: looking forward to the bash onliner book!

August 19, 2013, 10:31

I'm too interested in bundle? Is that possible?

August 20, 2013, 23:18

Yep, just send me $19.90 to peter@catonmat.net over PayPal (price of sed+perl book, and you get awk book free), and I'll instruct my book system to send all 3 books to you. Check spam folder if you don't see it in inbox. I run my own outgoing mail server and lots of mail servers dont love me.

marc Permalink
September 21, 2014, 13:51

Peter, you have a great blog but one thing that is killing it is the these spammers posting their bs links all over yor blog

December 27, 2014, 09:20

Hey thanks. I've cleaned up most of the spam and added better anti spam protection. :)

Pavan Kumar Permalink
January 09, 2015, 18:58


Is it possible to get your ebooks through amazon or flipkart.

- Thanks

January 10, 2015, 23:05

You can buy the Perl One-Liners book through Amazon:

Perl One-Liners on Amazon.

The other books are only available through my website.

Nauseous Permalink
April 01, 2015, 19:25

How much are all your books. Do you have an options to buy all books all at once :-)?

April 02, 2015, 05:36

You can definitely buy all books at once. The price would be $19.90 (Sed book + Perl book, and Awk book free). Just send me a PayPal payment of $19.90 and message me at peter@catonmat.net, and I'll get all 3 books sent to you.

Nauseous Permalink
April 02, 2015, 15:34

Your payment email for paypal is also peter at catonmat.net? Just want to make sure.

April 02, 2015, 16:19

Yes, my paypal email is also peter@catonmat.net.

May 22, 2015, 04:21

Great site Peter!

I have been reading for about a year now and really enjoy your posts / updates and enthusiasm for all things tech. I'm a sysadmin who wants to strengthen my scripting skills with what I consider essential tools in my kit (awk, sed & perl)

I also would like to purchase your 3 ebooks for the bundle price. Can you let me know if this ok? Feel free to email the address I provided.

Keep up the good work!

May 22, 2015, 16:30

Thanks buddy! The bundle price is still active. Just send me $19.90 to peter@catonmat.net and a quick email and I'll get them delivered to you. :)

April 18, 2017, 17:48

Hi Peter! It's 2017, and I want to update this thread. Is your bundle still available, and is it still $19.90 via paypal to peter@catonmat.net?

Regardless, awesome work Peter. I'm both impressed and envious, your attitude and accomplishments are fantastic. You represent some of the best of *NIX!

April 24, 2017, 23:28

Yup! The bundle is available. Send $19.90 my way and I'll have books sent your way.

softy Permalink
February 22, 2018, 16:46

I'd like to buy all of your e-books, but really dislike reading e-books. If I buy them, will they come in a format that will allow me to print them out so that I can hold them in a physical (paper) form while relaxing on a couch by a fire?

elucian Permalink
March 07, 2018, 08:05

Is the bundle still available, $19.90 via paypal to peter@catonmat.net?

Leave a new comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "unix_274": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.