[-] learnbyexample@programming.dev 6 points 3 weeks ago

Regex syntax and features vary between implementations. \d isn't supported by BRE/ERE flavors.

GNU grep supports PCRE, so you can use grep -oP '/dev/loop\d' or grep -o '/dev/loop[0-9]' if you are matching only one digit character.

40
115
14
22
79
76
111

Hello!

I am pleased to announce a new version of my CLI text processing with GNU sed ebook. This book heavily leans on examples to present features one by one. In addition to sed commands and options, regular expressions are also discussed in detail.

Links

You can read the book online here: https://learnbyexample.github.io/learn_gnused/

Interactive TUI app for exercises: https://github.com/learnbyexample/TUI-apps/blob/main/SedExercises

Feedback

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

Happy learning :)

12
Linux Page Cache (biriukov.dev)
10
80
SSH Tips and Tricks (carlosbecker.com)
16
9
Pytorch internals (blog.ezyang.com)
[-] learnbyexample@programming.dev 6 points 3 months ago

Well, if you are comfortable with Python scripts, there's not much reason to switch to awk. Unless perhaps you are equating awk to Python as scripting languages instead of CLI usage (like grep, sed, cut, etc) as my ebook focuses on. For example, if you have space separated columns of data, awk '{print $2}' will give you just the second column (no need to write a script when a simple one-liner will do). This of course also allows you to integrate with shell features (like globs).

As a practical example, I use awk to filter and process particular entries from financial data (which is in csv format). Just a case of easily arriving at a solution in a single line of code (which I then save it for future use).

[-] learnbyexample@programming.dev 6 points 6 months ago

I wish you success. I'm happy to use SimpleScreenRecorder(https://github.com/MaartenBaert/ssr).

I had to learn Linux CLI tools, Vim and Perl at my very first job. Have a soft spot for Perl, despite not using it much these days other than occasional one-liners (mainly for advanced regex features).

[-] learnbyexample@programming.dev 6 points 2 years ago

I have a list of curated resources here: https://learnbyexample.github.io/py_resources/

There are sections for beginners, intermediate, advanced, etc. Also included are exercises, projects, debugging, testing, and many more stuff. Hope it helps :)

[-] learnbyexample@programming.dev 6 points 2 years ago* (last edited 2 years ago)

Check out https://github.com/auctors/free-lunch (list of free Windows software)

See also https://www.nirsoft.net/ (freeware, not open source)

[-] learnbyexample@programming.dev 5 points 2 years ago

I have a book for Perl One-Liners as well, which I'm currently revising :)

[-] learnbyexample@programming.dev 5 points 2 years ago

I've written books on regex too, if you are interested in learning ;)

[-] learnbyexample@programming.dev 6 points 2 years ago

I read three progression fantasy books in the past three days, so I'm going to take a break and get some of my actual work done :D

Card Mage: Slumdog Deckbuilder by Benedict Patrick (book 1 of a new series) was well written and a compelling read, but I'd have enjoyed it a lot more if it was lighthearted.

Overpowered Dungeon Boy by Benjamin Barreth (2 book completed series) was a lighthearted fun read. The OP main character took a while to warm up to, but many of the side characters were easy to root for.

[-] learnbyexample@programming.dev 5 points 2 years ago

I mostly read on Kindle Unlimited. A lot of the progression fantasy and cozy fantasy books are on KU (my current favorite subgenres), so there's no shortage of books to read. In addition, there's plenty of self-pub fantasy and sci-fi books (there are two competitions: SPFBO and SPSFC which help in finding good ones to read).

view more: ‹ prev next ›

learnbyexample

joined 2 years ago