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 (if possible) be generally useful.
Jay said: > As for the corner cases, the least-surprising and probably easiest > thing to do is emulate dirname(1), which (I'm told) is exactly what > Perl's File::Basename does. This makes sense. It seems File::Basename is in perl 5.003, so it should be safe to use that. /Ole On Mon, Apr 25, 2011 at 5:47 PM, Cook, Malcolm <[email protected]> wrote: > 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-ing to the directory holding the found file, would serve the purpose as > well, if not better. Perhaps rather add a -cd option to `parallel` which > would force cd prior to launching the process. > > All of these are perhaps only useful in multicore on single server, not > distributed parallelism....???? > > Cheers, > > Malcolm Cook > Stowers Institute for Medical Research - Bioinformatics > Kansas City, Missouri USA > > > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf >> Of Ole Tange >> Sent: Saturday, April 23, 2011 6:59 AM >> To: Cook, Malcolm >> Cc: [email protected] >> Subject: Re: {.} {/} {/.} ... >> >> On Fri, Apr 22, 2011 at 9:12 PM, Cook, Malcolm >> <[email protected]> wrote: >> > how about some syntax to get the dirname of {} >> > >> > maybe {..} >> >> Can you start by giving a few good examples on where this >> would be useful? >> >> What should {..} be if {} = foo.jpg (i.e. no dir)? >> >> What should {..} be if {} = mydir/ (i.e. {} is a dir)? >> >> /Ole >> >>
