Re: Beginner's questions

2015-08-06 Thread Ole Tange
On Tue, Aug 4, 2015 at 5:15 PM, Rory Molinari wrote: > Hello, > > I have only recently discovered parallel and wish I had found it years ago. > Thanks for such a great tool, Ole! Mange tak! If you like GNU Parallel: · Give a demo at your local user group/team/colleagues ·

Syntax - your opinion wanted

2015-08-06 Thread Ole Tange
I am considering making each positional argument available in @arg. What should these command do? parallel echo '{= $_ = ($arg[1] > 1 ? "a" : "b") =}' ::: 0 ::: 2 parallel echo '{= $_ = $_ =}' ::: 0 ::: 2 parallel echo {1} '{=1 $_ = ($arg[1] > 1 ? "a" : "b") =}' ::: 0 ::: 2 /Ole

RE: Syntax - your opinion wanted

2015-08-06 Thread Cook, Malcolm
Are those supposed to be two separate calls to parallel? They came across as a single line in my email. parallel echo '{= $_ = ($arg[1] > 1 ? "a" : "b") =}' ::: 0 ::: 2 should echo "b" to stdout since zero is not greater than one parallel echo '{= $_ = $_ =}' ::: 0 ::: 2 should echo "0 2" sin

Re: Syntax - your opinion wanted

2015-08-06 Thread Ole Tange
On Fri, Aug 7, 2015 at 12:17 AM, Cook, Malcolm wrote: : > parallel echo '{= $_ = ($arg[1] > 1 ? "a" : "b") =}' ::: 0 ::: 2 > > should echo "b" to stdout since zero is not greater than one You are treating $_ as if the change happens to the whole string - not the individual parameters. Given that,