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
20082026
-
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…
comment by metadat · 2022-10-27 · in Shell script best practices, from a decade of scripting things -
▲ 6
Learn to use Awk with hundreds of examplesstory by metadat · 2022-10-26 · 0 comments
-
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/
comment by nomorecommas · 2022-02-12 · in Easily handle CLI operation via Python instead of regular Bash programs -
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 -
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 -
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 -
▲ 10
Ask HN: What are some of the cool links you've been meaning to look at?story by faizshah · 2020-09-09 · 6 comments
-
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…
comment by asicsp · 2020-04-03 · in Show HN: An eBook with hundreds of GNU Awk one-liners -
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]…
comment by asicsp · 2020-04-02 · in Show HN: An eBook with hundreds of GNU Awk one-liners -
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) -
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…
comment by e12e · 2020-01-31 · in How to build a search engine with common Unix tools (2018) [pdf] -
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) -
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 -
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) -
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 -
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 -
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.…
comment by asicsp · 2019-05-29 · in Removing duplicate lines from files keeping the original order with Awk -
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...
comment by asicsp · 2019-05-29 · in Removing duplicate lines from files keeping the original order with Awk -
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 -
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,…
comment by asicsp · 2019-04-01 · in Show HN: Bsed – Simple, English syntax on top of Perl text processing -
I have an example based tutorial for all these commands plus other cli text processing commands https://github.com/learnbyexample/Command-line-text-processi...
comment by asicsp · 2019-03-07 · in Seven Unix Commands Every Data Scientist Should Know -
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…
comment by asicsp · 2018-08-14 · in Show HN: Rb – Turns Ruby into a command line utility -
>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...
comment by asicsp · 2018-06-08 · in I Quit My Job to Live on Donations to Zig -
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...
comment by asicsp · 2018-05-24 · in Command-line Tools can be 235x Faster than a Hadoop Cluster (2014) -
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..
comment by asicsp · 2018-05-24 · in The Awk Programming Language (1988) [pdf] -
▲ 2
Ruby one-linersstory by matt4077 · 2018-03-11 · 0 comments
-
▲ 1
Command Line Text Processingstory by ingve · 2018-03-10 · 0 comments
-
▲ 12
Command line text processingstory by galfarragem · 2018-03-09 · 0 comments
-
▲ 2
Learnbyexample: Hundreds of Ruby one-liners for cli text processingstory by asicsp · 2018-03-06 · 1 comment
-
▲ 16
Perl awesome onelinersstory by vgy7ujm · 2017-12-20 · 1 comment
-
▲ 2
Command Line Text Processingstory by kawera · 2017-10-25 · 0 comments
-
▲ 478
Learn to use Awk with hundreds of examplesstory by asicsp · 2017-10-25 · 116 comments
-
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 -
▲ 2
Commandline Text Processingstory by bhuthesh_r · 2017-04-08 · 0 comments