Top all-time · #6783
Rob Miller
Personal blog · robm.me.uk · on HN as robmilprogrammingwriting
Rob Miller writes Roblog, a personal blog at robm.me.uk about programming and writing. Since 2013, 12 different Hacker News readers have linked it 20 times, most often “Ruby instead of sed/Awk/Perl for text processing”. It is still writing: the last post was on 2026-03-10, and you can follow it by feed.
Too few sampled comments (7) to say how often HN recommends it.?
Why HN links it
HN readers link Rob Miller's posts on Ruby command-line use, such as ENP, ARGF and $_, and his awk text-processing book, in discussions of shell scripting and Ruby one-liners.
Summarised by Claude from a sample of 7 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
I work as a business strategist, a software developer, a marketer and a writer. I'm the founder of Orso, where I work with consumer businesses to help them solve brand, tech, and marketing problems.
Most-linked posts?
- Ruby instead of sed/Awk/Perl for text processing2 people · 4 mentions · first linked 2021-06-20
- /ruby/2013/11/20/ruby-enp.html2 people · 2 mentions · first linked 2018-05-15
What Hacker News says?
I personally consider awk, sed, grep, cut, etc. to be "part" of bash. I don't think I ever write a script without invoking those venerable tools at least once. I often have many pipes, such as some_command \ | grep -E 'some.*regex$' \ | sed -e 's/erase_text//g' \ | sed -e 's/erase_more//g' \ | awk '{ print $2 }' \ | cut -d ':' -f 1 I used to reach for Perl one-liners a lot, and still do sometimes when I need a gross…
Comment linking /ruby/2013/11/20/ruby-enp.html
on “Safe ways to do things in bash”Submitted The Thermocline of Truth as a story · 57 points
HN discussionMore on this: https://robm.me.uk/ruby/2013/11/20/ruby-enp.html https://robm.me.uk/ruby/2013/12/03/argf-ruby.html https://robm.me.uk/ruby/2015/10/31/dollar-underscore.html and his book: https://pragprog.com/book/rmtpruby/text-processing-with-ruby
Comment linking /ruby/2015/10/31/dollar-underscore.html
on “How is Ruby different in Japan?”Submitted Decoding "Almost Sinatra" as a story · 4 points
HN discussionThis reads a lot like Engelbart's work on organizational augmentation/collective IQ etc. Tough stuff to get right. https://robm.me.uk/2021/07/collective-iq-improvement/ https://www.dougengelbart.org/content/view/256/340/
Comment linking /2021/07/collective-iq-improvement/
on “Work is work, in which returns diminish (2020)”Submitted Cultivating Serendipity as a story · 3 points
HN discussionFor people that know Ruby, if you haven't explored Ruby's CLI abilities, you definitely, definitely should[1][2]. When I was building my (free and open source) awk course[3] I fell in love with awk. When I later found out that Ruby has some of the same features, it changed my life: [1]: https://robm.me.uk/2013/11/ruby-enp/ [2]: https://benoithamelin.tumblr.com/ruby1line/ [3]: https://github.com/FreedomBen/awk-hack-t…
Comment linking /2013/11/ruby-enp/
on “Easily handle CLI operation via Python instead of regular Bash programs”Submitted Using Nokogiri to screen-scrape from the command line as a story · 2 points
HN discussionYou can cut that back a bit with the '-n' switch. Using an example from this helpful article[1] on some of the switches Ruby inherited from Perl: ps ax | ruby -e 'ARGF.each { |line| puts line.split.first if line =~ /top/ }' becomes: ps ax | ruby -ne 'puts $_.split.first if $_ =~ /top/' It even squashes the extra newline the ARGF version prints out first. [1] https://robm.me.uk/ruby/2013/11/20/ruby-enp.html
Comment linking /ruby/2013/11/20/ruby-enp.html
on “Show HN: Ruby One-Liners Cookbook”Submitted Accessing WordPress from Ruby: Part II as a story · 2 points
HN discussionIt sounds like we do very similar jobs and feel the same way about Python. I'm 97% sure you're going to stick with your own language, but for others seriously give Ruby a look. I absolutely adore Ruby as a scripting language. It's so easy and elegant to shell out to bash and do something with the output. When brevity or familiarity with bash is desired, variables like $? are there also (although there are generally…
Comment linking /2013/11/ruby-enp/
on “New Machine Learning Gems for Ruby”Submitted Accessing WordPress from Ruby as a story · 2 points
HN discussionI don't regularly use either language, but I prefer to use Ruby for this: https://robm.me.uk/2013/11/ruby-enp/ Example from that article $ echo "foo\nbar\nbaz" | ruby -ne 'BEGIN { i = 1 }; puts "# {i} # {$_}"; i += 1' output 1 foo 2 bar 3 baz
Comment linking /2013/11/ruby-enp/
on “The State of the Awk (2020)”Submitted Ruby instead of sed/Awk/Perl for text processing as a story · 1 points
HN discussionSubmitted Paths Aren't Strings (2014) as a story · 1 points
HN discussionSubmitted Decoding “Almost Sinatra” as a story · 1 points
HN discussionSubmitted Ruby's -e, -n, and -p switches as a story · 1 points
HN discussionSubmitted Accessing WordPress from Ruby #3: GravityForms as a story · 1 points
HN discussion