Bash question

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Dec 21 15:42:57 UTC 2011


On Tue, Dec 20, 2011 at 10:19:05PM -0500, Bill Heagy wrote:
> I think something like
> 
> for i in `ls [0-9]* | cut -b1-7|uniq`;do foobar ${i}*pdf -o new${i}.pdf;done

The ${I}*pdf is essentially doing an ls.

> will work.  This assumes that all files starting with a digit are
> eligible: adjust as required.  I don't know the syntax for your
> pdftk command: adjust this as required also.  Beware using ">" for
> redirecting output though: that requires careful use of quotes.

-- 
Len Sorensen
--
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