Difference between revisions of "Linux commands"

From Organic Design wiki
m
m
Line 5: Line 5:
 
*It loops through all PNG's in the CWD and puts them in a directory called ''processed'' which must exist
 
*It loops through all PNG's in the CWD and puts them in a directory called ''processed'' which must exist
 
{{code|<bash>
 
{{code|<bash>
perl -e 'qx "convert $_ -background \#00ff00 -flatten processed/$_" for glob "*.png"'
+
perl -e 'qx "convert $_ -background #ff00ff -flatten foo/$_" for glob "*.png"'
 
</bash>}}
 
</bash>}}

Revision as of 07:44, 20 April 2008

I'm starting a list of useful linux shell commands (generally "one liners") we use a lot

Apply an opaque background of a specified colour to a directory of transparent PNG's

  • This command requires ImageMagick to be installed
  • It loops through all PNG's in the CWD and puts them in a directory called processed which must exist
<bash>

perl -e 'qx "convert $_ -background #ff00ff -flatten foo/$_" for glob "*.png"' </bash>