joining multiple PDFs into one

Russ rreiter91-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Nov 15 18:30:07 UTC 2011


Again, going back to the basic problem, he only got the last of the three files in the pdf. If the first two weren't clobbered then where did they go?

Yanni Chiu <yanni at rogers.com> wrote:

>On 15/11/11 12:37 PM, Russ wrote:
> > Everything is affected by the variables set by the shell when it is
> > started. When the shell allows clobbering, existing file data is
> > overwritten on cat something>  somefile, when it doesn't, existing
> > data is preserved.
>
>First, did you try doing:
>
>$ rm -f f f3
>$ echo hello > f
>$ cat f f f > f3
>
>with noclobber set and not set, and see that it made no difference? Of 
>course, if you skip the 'rm -f f f3' AND have noclobber set on, then any 
>existing file f or f3 will not be changed, so the 'cat' command will 
>then have no affect.
>
>Second, try doing:
>
>$ rm -f f f3
>$ echo hello > f
>$ cat f f f
>
>What do you see on your terminal window? It should be:
>
>$ rm -f f f3
>$ echo hello > f
>$ cat f f f
>hello
>hello
>hello
>
>If you redirect stdout to file 'f3' using '> f3', why should it be 
>anything different from what appears on the terminal, whether or not 
>noclobber is set (and f3 does not already exist).
>
>Now back to the other alternative:
>
>$ echo hello > f
>$ cat f > f3
>$ cat f >> f3
>$ cat f >> f3
>
>It is equivalent code, because the the first '> f3' clobbers f3 with the 
>contents of f (assuming noclobber does not prevent the overwrite). The 
>second and third '>> f3' will append a second and third copy of f. The 
>'>>' is the shell's append operator.
>
>I'm not sure how to explain it any more clearly. You really have to try 
>the commands in a terminal, and see the results yourself.
>--
>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