joining multiple PDFs into one

Chris F.A. Johnson chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org
Tue Nov 15 21:26:44 UTC 2011


On Tue, 15 Nov 2011, Russ wrote:
> "Chris F.A. Johnson" <chris-E7bvbYbpR6jSUeElwK9/Pw at public.gmane.org> wrote:
>
>> On Tue, 15 Nov 2011, Russell Reiter wrote:
>>
>>> Someone else had posted that: cat file1.pdf > out.pdf cat file2.pdf
>>>>> out.pdf cat file3.pdf>>out.pdf worked and they were able to see all
>>> three PDF pages. Before anyone jumps on this I know this is not the
>>> same as the following.
>>>
>>> cat file1.pdf file2.pdf file3.pdf>out.pdf did not work, even though
>>> the man page says it should.
>>
>> cat file1.pdf > out.pdf; cat file2.pdf >> out.pdf; cat file3.pdf >> out.pdf
>>
>>    is exactly the same as
>>
>> cat file1.pdf file2.pdf file3.pdf > out.pdf
>>
>>    Both do exactly what the man page says they should.
>
> Unless cat is aliased to do something else, like clobber on > and append on >>

    Anyone who aliases a standard command to anything that changes its
    basic behaviour deserves all the grief they can get. (I know some
    distros do that, but it's still stupid -- and sometimes dangerous!)

    'clobber on > and append on >>' is the standard behaviour.

    If noclobber is set, then both will fail if file3.pdf exists and
    succeed if it doesn't.

>>    Whether is works with any particular type of file depends on the
>>    file structure, not on the cat command.


-- 
    Chris F.A. Johnson, <http://cfajohnson.com/>
    Author:
    Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list