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