oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

Home Page:http://www.oilshell.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More concurrency constructs (xargs, gnu parallel, nonlinear pipelines)

andychu opened this issue · comments

Basically I want us to have something like:

find --qtsv . | each {
  echo "$name --- $size"
}

Also, with Oil blocks, I imagine instead of

diff <(sort left.txt) <(sort right.txt)

You could factor it out like:

var p1 = &(sort left.txt) 
var p2 = &(sort right.txt)

diff $stdout(p1) $stdout(p2)

Random idea here: https://news.ycombinator.com/item?id=25939152

grep FOO *.py | wc -l | sort -n

pipeline {
  pipe :p1  # variables that are pipes
  pipe :p2

  # this syntax isn't great but shows the idea
  grep FOO *.py > &p1
  < &p1 wc -l > &p2
  < &p2 sort -n
}