↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Bringing the best of Bash scripting to Ruby (by @radekpazdera)

The post says Bash is fast for small tasks, but scripts become harder to maintain when they grow. Its goal is to keep the first version simple while leaving room for reuse and extension in Ruby.

Reading notes
#

  • Bash works well for small tasks because it is fast to write and run.
  • As scripts grow, the author sees reuse and extensibility as more valuable.
  • Docopt is presented as a simple way to define CLI arguments from a usage string.
  • Scriptster is described as a small gem for running shell commands and logging what happens.
  • Scriptster includes a wrapper for docopt, which reduces boilerplate when starting a Ruby script.
  • The author suggests putting a small template command in a shell rc file so a new Ruby script can be created quickly.
  • The setup aims to keep Ruby close to Bash speed for scripting while keeping Ruby available when the task grows.