Hacker GitHub

← All repos

learnbyexample/Command-line-text-processing

View on GitHub ↗ ★ 10,174 Shell archived

:zap: From finding text to search and replace, from sorting to beautifying text and more :art:

34 mentions on Hacker News by 12 people: 10 stories, 24 comments · first 2017-04-08 · latest 2022-10-27

Mentions per year 34 mentions · busiest year 2019 (9)
20082026
  1. Awk is an amazingly effective tool for getting things done quickly. Submitted yesterday: Learn to use Awk with hundreds of examples https://github.com/learnbyexample/Command-line-text-processi... https://news.ycombinator.com/item?id=3334993…
  2. Yep, ruby is a natural, pipeline friendly, command line companion out of the box. https://github.com/learnbyexample/Command-line-text-processi... https://learnbyexample.github.io/learn_ruby_oneliners/
  3. I had a similar experience with one of my GitHub repos [0] that is currently 9k+ stars. I added donation link when it was about 5k stars (after it went viral courtesy HN). But this was before GitHub sponsors. I removed donation links after…
    comment by asicsp · 2021-04-14 · in My simple GitHub project went viral
  4. Here's some more lists (better formatted) * http://www.compciv.org/unix-tools/ * https://www.commandlinefu.com/commands/browse/sort-by-votes * https://linoxide.com/linux-how-to/linux-commands-brief-outli... *…
    comment by asicsp · 2020-11-12 · in Linux Command One-Liners
  5. Hello! I had started tutorials on command line text processing ( https://github.com/learnbyexample/Command-line-text-processi... ) more than three years back. I learnt a lot writing them and continue to learn more with experience. I…
    comment by asicsp · 2020-11-06 · in Perl One-Liners Cookbook
  6. Someone else already asked for perl one-liners in this thread. I started with command line text processing repo [1] about three years back. That has a chapter on grep/sed/awk/perl/ruby one-liners along with many other tools. I may convert…
  7. I started with command line text processing repo [1] about three years back. That has a chapter on grep/sed/awk/perl/ruby one-liners along with many other tools. I may convert perl one-liners to a book as well later. [1]…
  8. Nice! A few suggestions if I may: * please consider using the same prompt for all examples, a few of them start with `code` while some others start with `awk book` and some do not have any prompt at all * split long chapters into smaller…
    comment by asicsp · 2020-03-01 · in Learn Awk by Example (2019)
  9. Just for anyone else, you could probably end up in a similar corner with perl - but in both cases it's likely a case of "holding it wrong" - ruby borrows heavily from perl which borrowed heavily from shell with sed, awk, grep, cut and…
  10. I have a repo dedicated for some of the cli text processing tools like grep/sed/awk/perl/sort/etc. Here's my one-liner collection for awk [1] [1] https://github.com/learnbyexample/Command-line-text-processi...
    comment by asicsp · 2020-01-22 · in Why Learn Awk? (2016)
  11. Perl's problem is that it's more confusing than it is powerful. I think most of the people who were into Perl for the "beauty" ended up going to ruby. People who were into it for CPAN went to python. You might find this interesting, as you…
    comment by anon9001 · 2019-12-12 · in Password Generator
  12. Reminds me of a similar article [1] Once you get a hang of how shell constructs like pipes, redirections, globs, variable/command substitutions, etc, the various cli text processing tools like grep, sed, awk, perl, sort, tr, pr, paste, etc…
    comment by asicsp · 2019-09-29 · in Learn Just a Little Awk (2010)
  13. I made a compilation of Ruby one-liners [1] as well last year. There's plenty of stuff that is similar to Perl, which in turn had borrowed from awk, sed and other tools. The biggest difference I'd pick is Perl's context based operation. #…
    comment by asicsp · 2019-09-14 · in Ruby One-Liners
  14. I have a curated list of resources[1] on topics like learning command line basics, bash scripting, style guide, etc. I have also have my own basics guide[2] and a comprehensive cli text processing repo[3] [1]…
    comment by asicsp · 2019-07-29 · in Show HN: Memorize Terminal Commands
  15. I'd say it is more similar to perl than awk for options like -F -l -a -n -e -0 etc. And perl borrowed stuff from sed, awk, etc I have a collection for ruby one-liners too [1] [1] https://github.com/learnbyexample/Command-line-text-processi.…
  16. I have a collection of such one-liners, for duplicates including how to form key for multiple fields, see [1] [1] https://github.com/learnbyexample/Command-line-text-processi...
  17. I haven't tried it yet, but it would depend on what sort of features you need Python wouldn't be a good choice for cli usage Perl is awesome to use from cli, and it is not just simple search and replace, see my tutorial[1] if you want to…
    comment by asicsp · 2019-04-16 · in Ripgrep 11 Released
  18. some notes on the sample awk/sed/perl one-liner given: # input line has to be explicitly printed awk '{gsub(/Jack/,"Jill")} 1' file.txt # -i will do inplace editing, unlike the awk command # -i by itself won't work on non-GNU versions,…
  19. I have an example based tutorial for all these commands plus other cli text processing commands https://github.com/learnbyexample/Command-line-text-processi...
  20. for your given sample, you could use awk[0] as well awk 'NR>1{print $2}' or ruby[1] ruby -ane 'puts $F[1] if $.>1' which one to use depends on lots of factor - speed, features, availability, etc as well as whether user already knows…
  21. >Well-known project with 5000 stars? Here, have more stars. Here, have more donations agree with getting more stars, but donation? not yet :-/ :( https://github.com/learnbyexample/Command-line-text-processi...
  22. I have a repo dedicated to cli text-processing.. short-descriptions and tons of examples.. I had fun and learned a lot doing this link: https://github.com/learnbyexample/Command-line-text-processi...
  23. one-liners are fun though, especially if you like code golfing.. if you're interested, you could give my tutorial( https://github.com/learnbyexample/Command-line-text-processi... ) a try it has over 300 examples..
  24. for the ls parsing example, you can do shopt -s nocaseglob ls ~/Downloads/*.{png,jpg,jpeg,gif,webp} ---- for command line tools (grep/sed/awk/sort/etc), you can refer my ongoing project ( https://github.com/learnbyexample/Command-line-text-…
    comment by asicsp · 2017-10-11 · in You Should Learn Regex