Re: [SLUG] Bash Script

From: Bob Stia (rnr@sanctum.com)
Date: Sun May 29 2005 - 01:29:59 EDT


On Saturday 28 May 2005 23:07, Eben King wrote:

> > > 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.
OK, Good. I am beginning to learn.
>
> > 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?

No ! nothing like that in the outgoing message to the list.
>
> > + $'\302\240' $'\302\240' $'\302\240'
> > $'\302\240'                                    
> >            /usr/bin/convert
>
> That too.

??????? I don't see anything like that in what I posted.
Hmmm...and why am I seeing these capital A's with the little thingy on
top. I certainly did not send them. At least it does not show up in the
out-going message.
>
> > + set $'+x\302\240' $'\302\240' $'\302\240' $'\30            
> >                                   2\240'
>
> That looks Perlish.
>
> > et: +� invalid option
>
> That too -- did it print that?

No, And I double checked what went out in the post. Nothing in the
message that was copied from the console like that at all.
>
> > set: usage: set [--abefhkmnptuvxBCHP] [-o option]

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

Eben, Don't know why or how you could be seeing that stuff that I did
not send. Just ran it again and here is the result:
-------------------------------------------------------------------
Running /home/bob/commands/ImageMagickConvert

/home/bob/commands/ImageMagickConvert: line 34:  
: command not found
/home/bob/commands/ImageMagickConvert: line 35:  
: command not found
/home/bob/commands/ImageMagickConvert: line 36:  
: command not found
/home/bob/commands/ImageMagickConvert: line 37:  
: command not found
+ $'\302\240' $'\302\240' $'\302\240'
$'\302\240' /usr/bin/convert
-quality 70 -geometry 800x600
' /home/bob/WebPages/PorschePilots/fog/temp/*.jpg'
'/home/bob/WebPages/PorschePilots/fog/carlouelima
ges/*.jpg'
/home/bob/commands/ImageMagickConvert: line
39:   : command not found
+ set $'+x\302\240' $'\302\240' $'\302\240' $'\30
2\240'
/home/bob/commands/ImageMagickConvert: line 40: s
et: +� invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option]
[arg ...]
bob@EasyStreet:~>
------------------------------------------------------------

> 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.
Dunno either. Can't believe you got lines that I did not send. I hope
the direct command that I copied from the console comes through
properly this time. Let me know and if necessary I will upload it to
the webpage.
>
> PS: "/" is a slash, "\" is a backslash. Linux uses a slash to
> indicate directory levels.

OK, was pretty sure I knew that. Kind of basic. Your use of the slash
kind of confused me in whether I was supposed to use it or not in the
command. If I need to put it up on the web page I will do so. Not sure
that will be productive or not. This SHOULD be simple. Just convert a
batch of photo sizes to be used in COMPOSING a page.

Bob S.

PS Others who offered help originally are free to jump in and offer
advice.

-----------------------------------------------------------------------
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:47 EDT