[Ilugc] What is wrong in this script ?

  • From: mak.gnu@xxxxxxxxx (Mukesh Yadav)
  • Date: Thu, 28 Jul 2011 20:34:20 +0530

I'm trying to compress js file via shell script here is code

#!/bin/sh
for file in `find . -name "*.js"`
do
echo "Compressing $file ?"
java -jar ~/yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar --type js -o
min/$file $file
done

but getting error an

bash: ./yuicompress.sh: /bin/sh^M: bad interpreter: No such file or
directory

What I'm doing wrong

-- 
Regards
Mukesh Yadav

Other related posts: