[GTALUG] Help need in bash
Stewart Russell
scruss at gmail.com
Thu May 31 15:00:59 EDT 2018
On Thu, May 31, 2018, 14:40 Stephen via talk, <talk at gtalug.org> wrote:
>
> #!/bin/bash
> cd /big1/memes/;
>
> shopt -s nullglob
> for f in "*.png"
> do
> echo $f
>
This is where you get the PNG echoes.
b=${f%.png}
> echo $b
> done
>
You can also do
convert file.{png,jpg}
and bash will do the magic. What I don't know is if that will accept a
glob.
Using convert is okay, but you won't end up with the smallest JPEGs that
way.
Stewart
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/talk/attachments/20180531/1ca33524/attachment.html>
More information about the talk
mailing list