Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Batch conversion of a bunch of Illustrator files to SVG files



Dave M G writes:

 > Let's see if I understand this...
 > 
 > $ cat > doit <<__EOF__
 > uniconverter input "$1" output "${1%.ai}.svg"
 > __EOF__
 > $ find . -maxdepth 1 -name _\* -print0 | xargs -0 doit
 > 
 > 
 > This creates a batch named "doit", and then in the second command I
 > execute the "doit" batch on the files found by the "find" command?
 > 
 > Is that all that's happening?

Yes.  Two further points: you probably should include a "shebang" to
let exec know which interpreter you want like this

    #!/bin/sh
    uniconverter input "$1" output "${1%.ai}.svg"

and (as jep alludes to) to execute the script it needs to be
executable (the chmod command) and findable by xargs.  Since . is not
in $PATH by default (for good and sufficient reasons I won't go into
here), you should have xargs invoke it as "./doit".


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links