Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #208301

Re: Shell Script Help

From Patrick Bartek <nemommxiv@gmail.com>
Newsgroups linux.debian.user
Subject Re: Shell Script Help
Date 2019-05-06 19:00 +0200
Message-ID <xUP85-dE-1@gated-at.bofh.it> (permalink)
References <xU4LT-5qI-3@gated-at.bofh.it> <xU9BT-8jc-7@gated-at.bofh.it> <xUMDf-7jv-3@gated-at.bofh.it> <xUMMV-7mO-1@gated-at.bofh.it> <xUOvn-8sh-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 6 May 2019 18:12:55 +0200
john doe <johndoe65534@mail.com> wrote:

> On 5/6/2019 4:24 PM, Greg Wooledge wrote:
> > On Mon, May 06, 2019 at 06:57:00AM -0700, Patrick Bartek wrote:  
> >> I want a script that allows commandline only applications that can't batch
> >> process to batch process.  A speciifc example. I will use the app
> >> enfuse, an exposure merging program, a poor man's HDR.
> >>
> >> patrick@Debian9:~/Work$ enfuse --output ab01.jpg --compression=97 ab01/DSC*.jpg
> >> patrick@Debian9:~/Work$ enfuse --output ab02.jpg --compression=97 ab02/DSC*.jpg
> >> :
> >> :
> >> patrick@Debian9:~/Work$ enfuse --output ab26.jpg --compression=97 ab26/DSC*.jpg
> >>
> >> I use shell history to repeat the command for each directory, changing the
> >>  --output filename and target directory numbers as necessary. Each diretory already
> >> holds the appropriate image files.  
> >
> > for dir in ab*/; do
> >     name=${dir%/}
> >     enfuse --output "$name.jpg" --compression=97 "$dir"/*.jpg
> > done
> >  
> 
> Putting the above as a one liner:
> 
> $ for dir in ab*/; do name=${dir%/}; enfuse --output "$name.jpg"
                                     ^
> --compression=97 "$dir"/*.jpg; done
                               ^
I added those semi-colons just as you did to make it one liner correct:
Same error.

Time to troubleshoot. I hope it's just a syntax error somewhere.

Thanks for your reply.

B

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Shell Script Help Patrick Bartek <patrick.bartek@gmail.com> - 2019-05-04 17:30 +0200
  Re: Shell Script Help john doe <johndoe65534@mail.com> - 2019-05-04 20:30 +0200
    Re: Shell Script Help Patrick Bartek <nemommxiv@gmail.com> - 2019-05-06 16:10 +0200
  Re: Shell Script Help Richard Owlett <rowlett@cloud85.net> - 2019-05-04 22:40 +0200
    Re: Shell Script Help Patrick Bartek <patrick.bartek@gmail.com> - 2019-05-06 16:20 +0200
      Re: Shell Script Help Greg Wooledge <wooledg@eeg.ccf.org> - 2019-05-06 16:30 +0200
        Re: Shell Script Help john doe <johndoe65534@mail.com> - 2019-05-06 18:20 +0200
          Re: Shell Script Help Patrick Bartek <nemommxiv@gmail.com> - 2019-05-06 19:00 +0200
        Re: Shell Script Help Patrick Bartek <nemommxiv@gmail.com> - 2019-05-06 18:50 +0200
          Re: Shell Script Help Greg Wooledge <wooledg@eeg.ccf.org> - 2019-05-06 19:10 +0200
            [SOLVED] Re: Shell Script Help Patrick Bartek <nemommxiv@gmail.com> - 2019-05-06 20:00 +0200
              Re: [SOLVED] Re: Shell Script Help David Wright <deblis@lionunicorn.co.uk> - 2019-05-06 22:20 +0200
                Re: [SOLVED] Re: Shell Script Help Patrick Bartek <nemommxiv@gmail.com> - 2019-05-07 03:30 +0200
            Re: Shell Script Help Dan Purgert <dan@djph.net> - 2019-05-06 20:10 +0200
  Re: Shell Script Help Will Mengarini <seldon@eskimo.com> - 2019-05-05 03:10 +0200
    Re: Shell Script Help Patrick Bartek <patrick.bartek@gmail.com> - 2019-05-06 16:20 +0200

csiph-web