Evaluates some code on all lines of the input e.g. `ls -l | each "puts l.split[4]" | all "puts lines.map(&:to_i).sum"`


License
MIT
Install
gem install dorian-all -v 0.6.0

Documentation

dorian-all

Evaluates some code on all lines of the input

e.g. ls -l | each "puts l.split[4]" | all "puts lines.map(&:to_i).sum"

Install

gem install dorian-all

Or as part of my other gems:

gem install dorian

Usage

From my history:

pbpaste | all "puts lines.map(&:strip).join(', ')"
printf 'Clément\nDorian\nMadiha\nRémi\nRayane\nMélanie\nJade' | all "puts lines.sample"
pbpaste | grep '*' | each "puts '\"' + line.split[1] + '\"'" | all "puts lines.map(&:strip).join(', ')"
cat a.txt | grep -v NEW | all "puts lines.map(&:strip).each_slice(2).map { |l| l.join(' '))"