On Wed, 24 Jan 2001, Kevin D. Clark wrote:

>
> [EMAIL PROTECTED] writes:
>
> > What bothers me is the fact that the command works from the command
> > line, but not from within the script. I've never had this happen before!
> > (Really!)
>
> What shell are you using at the command line?
>
echo $SHELL
/bin/bash

> What shell is running the shell script?
>
#!/bin/bash

>
> Can you provide a small script that exhibits this behavior?
>
Here is the portion of code that is giving me problems. Both the ls and
find command do what i want when entereed at the command line, but
neither do what I want when run here.

   # ls $1*.jpg > tn.temp
   find $1 -maxdepth 1 -name "*.jpg" > tn.temp
   while read LS
   do
      file=$LS
      if [ $COUNT -lt 10 ]
      then
         convert -size 50 $file tn-0$COUNT.jpg
      else
         convert -size 50 $file tn-$COUNT.jpg
      fi
# Un-comment for de-bugging
      # echo $file
      # sleep 1
      if [ $COUNT -lt 10 ]
      then
         echo "<a href=\"$file\"><img src=\"tn-0$COUNT.jpg\"></a>" >> thumbnails.html
      else
         echo "<a href=\"$file\"><img src=\"tn-$COUNT.jpg\"></a>" >> thumbnails.html
      fi
      COUNT=`expr $COUNT + 1`
   done < tn.temp
   rm tn.temp


-- 
Thomas M. Albright
Albright Enterprises - "The Small Business Solution"
http://www.albrightent.com/


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to