Hi all, Im having fun (NOT) with this little monkee:
#!/bin/sh
$i=1
im=image
ext=".jpg"
ls -l *.jpg|awk '{ print $9 }' > imagelist
images=`grep '^' imagelist`
for image in $images
do
cp $image "image"$i".jpg"
i=`expr $i + 1`
done
I get the following error(s)
cp: cannot stat `119051.jpg\r\r': No such file or directory
where 119051.jpg is an image .. where does it get the \r\r from?
and
expr: non-numeric argument but the i=`expr $i + 1` works fine in a different script.
Open to suggestions thanks ***************************************
Party on, dudes!
#!/bin/sh
$i=1
im=image
ext=".jpg"
ls -l *.jpg|awk '{ print $9 }' > imagelist
images=`grep '^' imagelist`
for image in $images
do
cp $image "image"$i".jpg"
i=`expr $i + 1`
done
I get the following error(s)
cp: cannot stat `119051.jpg\r\r': No such file or directory
where 119051.jpg is an image .. where does it get the \r\r from?
and
expr: non-numeric argument but the i=`expr $i + 1` works fine in a different script.
Open to suggestions thanks ***************************************
Party on, dudes!