On Tue, Nov 3, 2015 at 10:29 AM, <julio.ne...@gmail.com> wrote:

> An example is better than thousand words:
>
> $ seq 1 2 9 > odd
> $ seq 2 2 10 > even
> $ paste -d "" odd even
> 12
> 34
> 56
> 78
> 910
> $ paste -d"" odd even
> 2
> 4
> 6
> 8
> 10
>
> Like you can see, with no space between the option (-d) and the null
> parameter (""), we have an unexpected result
>


This isn't a bash bug so this isn't the proper place for your question.

However, what is happening is that the shell evaluates the -d"", removing
the quotes and resulting in -d followed by nothing (so it's the same as if
you had typed -d by itself.

As a result, the delimiter becomes the first character of "odd" and only
one file (even) is pasted.

So

paste -d"" odd even

is the same as

paste even

Try this for comparison:

paste -d"" odd even even

-- 
Visit serverfault.com to get your system administration questions answered.

Reply via email to