On Nov 3, 2015 12:47 PM, "Julio C. Neves" <julio.ne...@gmail.com> wrote: > > Thanks Dennis, > I know that you are rigth, but "paste -d"" odd even" and "paste -d "" odd even" are not the same? The diference is only a space between the option and its parameter. > > Abcs, > Julio > @juliobash > > Próximos cursos de Shell > Cidade Local Período > São Paulo 4Linux 07/12 a 11/12 > Dou treinamento de Shell em qualquer cidade. > Para mais detalhes, me mande um e-mail. > > > 2015-11-03 15:47 GMT-02:00 Dennis Williamson <dennistwilliam...@gmail.com >: >> >> >> >> 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. > >
No, they're different. I and others have explained how.