logoalt Hacker News

magarnicletoday at 9:26 AM2 repliesview on HN

man bash. That's the secret. man bash.


Replies

zokytoday at 10:14 AM

The cool thing about programming languages like Ruby is that they’re very conducive to one-liners. You can use them to generate bash statements that you can then pipe back to bash. `ls | ruby -nle 'puts "mv #{$_} #{$_.gsub(/_/, ".")}"' | bash` is a pattern I use all the time, for example. Easy way of generating complex bash statements without having to bother with the bash man page.

show 1 reply
pcbluestoday at 11:09 AM

Seems to be the flavour of the day :)