On Wed, 4 May 2011, Ole Tange wrote:
On Wed, May 4, 2011 at 6:11 PM, Hans Schou wrote:
> On Wed, 4 May 2011, Ole Tange wrote:
>> On Wed, May 4, 2011 at 4:21 PM, Ole Tange wrote:
>>> The problem with these approaches is that if one of the files is
>>> called ':::' or '::::' then this will no longer work because the
>>> ::: or :::: will confuse GNU Parallel:
>
> It is not very often I give my files that name.
And if you _know_ you have files called that, you can use --arg-sep
and --arg-file-sep to replace ::: and :::: with another string.
Or do what works for a great number of programs and use a full or
relative path to disambiguate:
==> force filename by prefixing './' <==
$ touch ./-l
$ ls -l -l
(long output of current dir -- '-l' not treated as file)
$ ls -l ./-l
-rw------- 1 bhaskell users 0 2011-05-04 15:33 ./-l
==> parallel-related: <==
$ seq 3 > ./-
$ seq 4 > ./:::
$ seq 5 > ./::::
$ parallel echo {} :::: ./- | paste -sd' '
1 2 3
$ parallel echo {} :::: ./::: | paste -sd' '
1 2 3 4
$ parallel echo {} :::: ./:::: | paste -sd' '
1 2 3 4 5
(I notice that this doesn't work for '-a'. '-a ./-' and '-a -' which
both work like './-', somewhat surprisingly)
--
Best,
Ben