Shrinking Images

Hoshil N. Desai hoshildesai-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Sep 2 14:27:54 UTC 2004


I finally got the script to work.  I had to remove all the error checking
(the if-else) and that did it.  With the if-else statements in place I was
getting the following two errors:

mkJPEGdir: line 18: syntax error near unexpected token `elif'
'kJPEGdir: line 18: `elif [ ! -d "${JPEGdir}" ]; then

I thought I was introducing some extra characters while downloading so I
tried

wget http://home.eol.ca/~hgibson/mkJPEGdir

Thus making sure I was not adding anything to the original file.  But still
the errors persisted.

Anyways, I got it to work without the if-else and it saved me downloading
and configuring one of the image galleries.

Thanks for the script Howard.



-----Original Message-----
From: owner-tlug-lxSQFCZeNF4 at public.gmane.org [mailto:owner-tlug-lxSQFCZeNF4 at public.gmane.org] On Behalf Of Howard
Gibson
Sent: Thursday, September 02, 2004 12:08 AM
To: Hoshil Desai
Cc: Toronto Linux User's Group
Subject: Re: [TLUG]: Shrinking Images

On Wed, 1 Sep 2004 14:45:23 -0400
"Hoshil Desai" <hoshildesai-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org> wrote:

> Hi Howard,
> 
> This is probably a very stupid question (that's why I am asking it off the
> list) but I could not get that script to work.
> 
> I tried sh mkJPEGdir  - It didn't work
> 
> I tried chmod a+x mkJPEGdir followed by a ./mkJPEGdir and it didn't work.
> 
> In both the cases I got some token not found error.
> 
> Maybe I am doing something really wrong.  I have other bash scripts which
> work without a hitch.  If you could direct me in the right direction, I
> would appreciate it.

Hoshil,

   I cc'ed the list on this because someone else may recognize it.  

   I am unable to reproduce your token not found error.  I assume you have
ImageMagick installed because renaming the convert command causes a command
not found error.  Retyping variables incorrectly causes them to contain no
data.  There is no explicit error message, although the output is messed up.
Changing the command shell from sh to all sorts of other stuff often messed
up, but not with the token not found error.

   What happened when you typed ./mkJPEGdir on its own?  If you give it
anything other than three operators, you should get a usage message.

   It is always possible that some kind of error crept in on your download.
Try saving the file again.

-- 
Howard Gibson 
hgibson-MwcKTmeKVNQ at public.gmane.org
howard-42qnO8ePF9cV+D8aMU/kSg at public.gmane.org 
http://home.eol.ca/~hgibson
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list