Re: {.} {/} {/.} ...

2011-04-25 Thread Jay Hacker
How about $(dirname {})? As in: find . | parallel 'echo $(dirname {})' On Fri, Apr 22, 2011 at 3:12 PM, Cook, Malcolm wrote: > how about some syntax to get the dirname of {} > > maybe {..} > > ~malcolm >

RE: {.} {/} {/.} ...

2011-04-25 Thread Cook, Malcolm
Ole, Such a feature would be useful whenever you wanted to place the output of processing a file in the same directory as the file. For instance, untarring all the tar files found recursively in a directory tree. Actually, having something like `find -execdir`, which runs the exec after cd-in

RE: {.} {/} {/.} ...

2011-04-25 Thread Cook, Malcolm
Thanks, Jay, sure, that works fine and is what I'm doing now. Similarly, $(basename {}) work instead of {.} It is just a convenience factor that is easily coded around. I think my request to have parallel exec the code in the directory containing the file is perhaps more relevant what do yo

Re: {.} {/} {/.} ...

2011-04-25 Thread Jay Hacker
The thing is, you can give parallel filenames that don't exist, and it's still useful to be able to operate on them, which dirname can do but find -execdir cannot. Re-implementing find seems like a lot of undesirable complexity. I agree that it might be convenient to have a shorthand for dirname;

how to do this in parallel

2011-04-25 Thread Mag Gam
I have 2 files and I want to do something like this with parallel. fileA /var/log/httpd.log /var/log/mapd.log /var/log/mysqld.log /var/log/postgresql.log fileB host1 host2 host3 host4 I would like to run, 'md5sum' with `cat fileA` on all these hosts `cat fileB`. Any ideas?

Re: how to do this in parallel

2011-04-25 Thread Jay Hacker
For running the exact same command(s) on a bunch of machines, you might want to look into a tool like func or Cluster SSH. Parallel is more for "I have a bunch of jobs and I don't really care where they run." That said, it's certainly possible, with something like: $ parallel -q -j0 ssh {} 'echo

Re: {.} {/} {/.} ...

2011-04-25 Thread Ole Tange
Hi Malcom. I clearly did not explain why you should give examples: I am a lazy person and I prefer others write my man pages. So it would be great if you could come up with a couple examples that can be used directly in the man page: write the command line, not just the words. The examples should

Re: how to do this in parallel

2011-04-25 Thread Ole Tange
See also: http://lists.gnu.org/archive/html/parallel/2011-01/msg00011.html /Ole On Mon, Apr 25, 2011 at 7:38 PM, Jay Hacker wrote: > For running the exact same command(s) on a bunch of machines, you > might want to look into a tool like func or Cluster SSH.  Parallel is > more for "I have a bunc