CLI Fu: Difference between revisions

From Traxel Wiki
Jump to navigation Jump to search
(Created page with "Category:Hacking = Image Magick = Convert, noclobber: <pre>ls webp/*webp | sed 's/webp//g' | awk '{print "[ -f png"$1"png ] || convert webp"$1"webp png"$1"png"}'</pre> Conver, noclobber, thumbnail: <pre>ls png/*png | sed 's/png//g' | awk '{print "[ -f jpg"$1"jpg ] || convert -thumbnail 256x256 png"$1"png jpg"$1"jpg"}'</pre>")
 
Line 4: Line 4:
<pre>ls webp/*webp | sed 's/webp//g' | awk '{print "[ -f png"$1"png ] || convert webp"$1"webp png"$1"png"}'</pre>
<pre>ls webp/*webp | sed 's/webp//g' | awk '{print "[ -f png"$1"png ] || convert webp"$1"webp png"$1"png"}'</pre>


Conver, noclobber, thumbnail:
Convert, noclobber, thumbnail:
<pre>ls png/*png | sed 's/png//g' | awk '{print "[ -f jpg"$1"jpg ] || convert -thumbnail 256x256 png"$1"png jpg"$1"jpg"}'</pre>
<pre>ls png/*png | sed 's/png//g' | awk '{print "[ -f jpg"$1"jpg ] || convert -thumbnail 256x256 png"$1"png jpg"$1"jpg"}'</pre>

Revision as of 17:11, 16 April 2023

Image Magick

Convert, noclobber:

ls webp/*webp | sed 's/webp//g' | awk '{print "[ -f png"$1"png ] || convert webp"$1"webp png"$1"png"}'

Convert, noclobber, thumbnail:

ls png/*png | sed 's/png//g' | awk '{print "[ -f jpg"$1"jpg ] || convert -thumbnail 256x256 png"$1"png jpg"$1"jpg"}'