parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jay Hacker
Subject: Re: {.} {/} {/.} ...
Date: Mon, 25 Apr 2011 12:16:10 -0400

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; I use parallel as a multi-rename swiss army
knife all the time.  :)

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.



On Mon, Apr 25, 2011 at 11:50 AM, Cook, Malcolm <MEC@stowers.org> wrote:
> 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 you think?
>
> Malcolm Cook
> Stowers Institute for Medical Research -  Bioinformatics
> Kansas City, Missouri  USA
>
>
>
>> -----Original Message-----
>> From: parallel-bounces+mec=stowers.org@gnu.org
>> [mailto:parallel-bounces+mec=stowers.org@gnu.org] On Behalf
>> Of Jay Hacker
>> Sent: Monday, April 25, 2011 10:39 AM
>> To: parallel@gnu.org
>> Subject: Re: {.} {/} {/.} ...
>>
>> How about $(dirname {})?  As in:
>>
>> find . | parallel 'echo $(dirname {})'
>>
>>
>> On Fri, Apr 22, 2011 at 3:12 PM, Cook, Malcolm
>> <MEC@stowers.org> wrote:
>> > how about some syntax to get the dirname of {}
>> >
>> > maybe {..}
>> >
>> > ~malcolm
>> >
>>
>>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]