Problems calling LAME encoder via shell script from AppleScript

I have a shell script that encodes all audio files via LAME and moves them to another directory.
Shell script works fine when I invoke it via command line, but when I call it from applescript i get
"error “./extn.sh: line 14: lame: command not found”
Any ideas?

My one line applescript:

do shell script "cd /Users/wright/desktop/bash; ./extn.sh"

Here’s the shell script:
#! /bin/bash
if [ ! -d ./result ]
then
mkdir ./result
fi
for file in ls ./source
do
if [ -d $file ]
then
echo $file " is a directory, therefore will be skipped"
continue
else [ -f ./source/$file ]
echo $file
lame -a -b48 -f ./source/$file ./result/${file%.[^.]*}.mp3
fi
done

Hi,

try to specify the full path to the lame executable


.
 /path/to/lame -a -b48 -f ./source/$file ./result/${file%\.[^.]*}.mp3
.

ah that did it!
Thank you.
I don’t quite understand why that would make a difference, but it did.