Re: [SLUG] Bash Script

From: Eben King (eben1@tampabay.rr.com)
Date: Sat May 28 2005 - 23:07:03 EDT


On Sat, 28 May 2005, Bob Stia wrote:

> On Wednesday 25 May 2005 21:27, Eben King wrote:
> > On Wed, 25 May 2005, Bob Stia wrote:
> > > On Wednesday 25 May 2005 08:40, sean@hogston.com wrote:
> > > > ok I have one last thing to try and then i'm out of suggestions.
> > > > for the convert line change it to be /usr/bin/convert instead of
> > > > just convert. I suggest this only because it is using /bin/sh and
> > > > MAYBE when the script is running it does not find the convert
> > > > command. I have noticed this in some of my scripts so I usually
> > > > make it a habbit to either put the full path to the command or
> > > > set it as a variable.
> > >
> > > OK, added /usr/bin/  in front of the convert line. Didn't help.
> > > Still the same errors.  Thanks for trying to help. If you can think
> > > of anything else I am all ears.
> >
> > Put "set -x"/"set +x" above and below the call to "convert" to see
> > what it's _really_ calling, how it's being called, and when the
> > errors occur.  Then, adjust your response depending on what it says.
> > If it were not able to find "convert" (which adding "/usr/bin/" would
> > fix) then the error would be something about "command not found".
>
> Eben,
>
> Please excuse my ignorance. Put the whole "set -x"/"set +x" above and
> below the convert line or the "set -x" above and the /"set +x" below.
> (minus the quotes ?? )  The backslash is confusing.

Like you did.

> I put a set -x above and a set +x below and this is what i got:
> ----------------------------------------------------------------
> Running /home/bob/commands/ImageMagickConvert
>
> /home/bob/commands/ImageMagickConvert: line 34:  
> : command not found

Did it acttually print "Â" (A+Circumflex, 0xC2, compose ^ A), or is that
meant to be something else?

> + $'\302\240' $'\302\240' $'\302\240'
> $'\302\240'                                                /usr/bin/convert

That too.

> + set $'+x\302\240' $'\302\240' $'\302\240' $'\30                                              
> 2\240'

That looks Perlish.

> et: +� invalid option

That too -- did it print that?

> set: usage: set [--abefhkmnptuvxBCHP] [-o option]

Rather, given that error, it looks like it's Perl but instead it's being
interpreted by the shell.

> Starting to get frustrating. Looks like I need to do these images one x
> one in Gimp or Image Magick.

Dunno. It would be quite helpful if you bundled up the script and a log of
what you did, and what response you got (no retyping, as that can introduce
errors), put it on your web space, and posted the URL. Make changes to the
script if you want, but include a new copy of the script then.

PS: "/" is a slash, "\" is a backslash. Linux uses a slash to indicate
directory levels.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
              
           This message was created using recycled electrons.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:23:25 EDT