HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
ruby
shell
Ruby2021–2024
ruby / shell

shell

Shell implements an idiomatic Ruby interface for common UNIX shell commands

2Distinct people
3Mentions
0Explicit recommenders
68GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Shell implements an idiomatic Ruby interface for common UNIX shell commands

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year3 dated mentions

Observed mentions: 2021-10-31 19:55:17 UTC to 2024-07-17 07:29:24 UTC.

012021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

3 sources
Interesting that a lot of the (general, not specifically here) commentary is "don't use bash, use python" which I find quite clunky, noisy, and boilerplatey to do the same thing as a shell script. Kinda Master Foo and the Ten Thousand Lines†. Ruby's https://github.com/ruby/shell (which used to be bundled in Ruby itself) doesn't get much mention but is much more clear and useful to me. # system commands are not defined by default, only builtins, for safety Shell.def_system_command 'ls' Shell.def_system_command 'grep' Shell.def_system_command 'jq' Shell.new.transact do # simple redirs just work ls | grep('test') > 'some/file' ls | grep('other') | tee('foo') >> 'some/file' # pops at the end of the block cd 'some/dir' do # nested redir for demo (cat < 'foo.json') | jq '
Read the rest
In Introduction to Bash Scripting
> The Python and Ruby versions would be similar Not Ruby! sh = Shell.cd('/') sh.transact do system('tail -fq /var/log/nginx/access.log') | system("awk '{print $7}" | system("sort") | system("uniq -c") | system("sort -rn") end Pretty sure one could get without the system method with Shell having def method_missing(meth, * args) to call system([meth.to_s, * args]) or something, turning it into: sh.transact do tail '-fq' '/var/log/nginx/access.log' | awk '{print $7}' | sort | uniq '-c' | sort '-rn' end https://github.com/ruby/shell#pipe-etcprintcap-into-a-file
In The Case for Bash (2021)
ruby in some cases feel just like shell scripting, even more than perl.. you can even do piping to chain two commands together https://stackoverflow.com/questions/4234119/ruby-pipes-how-d... (edit: using the shell library https://github.com/ruby/shell so, not out of box in ruby, unfortunately, which is a mortal sin for replacing bash in scripts =/) Here are the ways to run a program in ruby https://stackoverflow.com/questions/7212573/when-to-use-each...
In Bash functions are better than I thought

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.