News for hackers. Stuff that matters.
Re:GNU Parallel – The command line power tool by dredmorbius on Wednesday August 14, 2013 @12:33AM (#6209944)
Nice. I just had to check to see if xargs has a similar feature. It doesn't, though the --no-run-if-empty and --verbose options are both handy. I believe I've used xargs with "echo <commandlist>" to proof output before committing it.

You can simply re-run that piped to bash (or your shell of choice) to execute commands if you wish (say, if parallel isn't available).

E.g.,

     echo foo bar baz | xargs -n1 -t echo ls | bash
... will execute 'ls foo; ls bar; ls baz', while showing the expanded command.
Re:GNU Parallel – The command line power tool by rcthompson on Wednesday August 14, 2013 @03:41AM (#6210322)
Yes, you can use echo, but that won't work if the command is something like "ls DIR | wc -l".
Re:GNU Parallel – The command line power tool by dredmorbius on Wednesday August 14, 2013 @11:54AM (#6212232)
Depending on how you want to do your counts or piping, you could run that after the xargs / parallel execution, which would be much more efficient (fewer processes and execs) anyhow.