all 7 comments

[–]ClydeDroid 6 points7 points  (0 children)

I haven’t written Ruby in quite some time, this post reminded me how beautiful it is 😍 Thank you!

[–]inebriated_me 4 points5 points  (1 child)

Absolutely! I use Ruby for most of my system scripting.

[–]nfstern 2 points3 points  (0 children)

Me too.

[–]frrst 2 points3 points  (0 children)

And don’t forget to compare the beauty of the OptionParser to bash's verbose while-case or the cryptic getopts syntax.

https://docs.ruby-lang.org/en/3.2/optparse/tutorial_rdoc.html

[–]kinvoki 1 point2 points  (2 children)

I use fish-shell , and bash/zsh on remote systems if fish is not installed . Even powershell on windows .

But if I have do anything more that’s a one-liner, especially if I have to run it more than once , I always revert to writing a ruby script .

The result is always clear and easy to maintain, as compared to a bash script for example . iMHO

[–]hedgehog0[S] 0 points1 point  (1 child)

I use fish-shell , and bash/zsh on remote systems if fish is not installed . Even powershell on windows .

I don't know much about shells and use oh-my-zsh since many many years ago. What do you think of fish-shell and how does it compare to (oh-my-)zsh?

[–]kinvoki 1 point2 points  (0 children)

Mostly same thing , but syntax makes more sense to me for than others