Re: [GTALUG] Help need in bash

2018-06-01 Thread Stewart C. Russell via talk
On 2018-06-01 10:34 AM, D. Hugh Redelmeier via talk wrote: > > | Using convert is okay, but you won't end up with the smallest JPEGs that > | way. > > What do you recommend? (Lightning talk?) oh I wish - the next couple of weeks I'm running more events than is sensible. anyway, of course I've

Re: [GTALUG] Help need in bash

2018-06-01 Thread Seneca Cunningham via talk
> On Jun 1, 2018, at 10:34, D. Hugh Redelmeier via talk wrote: > > | From: Stewart Russell via talk > > | Using convert is okay, but you won't end up with the smallest JPEGs that > | way. > > What do you recommend? (Lightning talk?) I would recommend being aware of the “-quality” flag for

Re: [GTALUG] Help need in bash

2018-06-01 Thread mwilson--- via talk
> On 2018-05-31 03:00 PM, Stewart Russell wrote: > convert *.{png,jpg} > > does *something*, but neither what you'd expect nor want) Multics had an "equal name" feature that conspired with the star-name parser to do what you would expect. A program like convert could have used it like

Re: [GTALUG] Help need in bash

2018-06-01 Thread William Park via talk
    convert file.{png,jpg}is same as    convert file.png file.jpgAnd,     convert *.{png,jpg}is same as    convert *.png *.jpg Sent from Yahoo Mail on Android On Fri, Jun 1, 2018 at 12:32 PM, Stewart C. Russell via talk wrote: On 2018-05-31 03:00 PM, Stewart Russell wrote: > >   convert

Re: [GTALUG] Help need in bash

2018-06-01 Thread Stewart C. Russell via talk
On 2018-05-31 03:00 PM, Stewart Russell wrote: > >   convert file.{png,jpg} > > and bash will do the magic. What I don't know is if that will accept a > glob.  narrator voice: it didn't accept a glob. (that is, convert *.{png,jpg} does *something*, but neither what you'd expect nor

Re: [GTALUG] Help need in bash

2018-06-01 Thread D. Hugh Redelmeier via talk
| From: Stewart Russell via talk | Using convert is okay, but you won't end up with the smallest JPEGs that | way. What do you recommend? (Lightning talk?) --- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk

Re: [GTALUG] Help need in bash

2018-05-31 Thread Stephen via talk
That is what I needed. Thank you! On 2018-05-31 04:47 PM, Seneca Cunningham via talk wrote: On May 31, 2018, at 14:40, Stephen via talk wrote: I want to build a script to convert any *.png files to *.jpg files using convert. Doing manually works fine. Building a script has presented

Re: [GTALUG] Help need in bash

2018-05-31 Thread Seneca Cunningham via talk
> On May 31, 2018, at 14:40, Stephen via talk wrote: > > I want to build a script to convert any *.png files to *.jpg files using > convert. > > Doing manually works fine. > > Building a script has presented problem. I am well versed in programming but > a novice with bash. > > My loop

Re: [GTALUG] Help need in bash

2018-05-31 Thread Stewart Russell via talk
On Thu, May 31, 2018, 14:40 Stephen via talk, 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

[GTALUG] Help need in bash

2018-05-31 Thread Stephen via talk
I want to build a script to convert any *.png files to *.jpg files using convert. Doing manually works fine. Building a script has presented problem. I am well versed in programming but a novice with bash. My loop through the files works fine. #!/bin/bash cd /big1/memes/; shopt -s