English 中文(简体)
sh/克什档案中出现奇怪错误
原标题:getting strange error in sh/ksh file

i) 遵循文字

YUI_PATH=www/code/build/b2b_dev/yuicompressor-2.3.5.jar
DIR=www/code/build/b2b_dev/build/web

cd $DIR
echo $DIR

for i in `find . -name *.js -o -name *.css`
do
   echo $i
   ${WAS_DIR}/java/jre/bin/java -jar $YUI_PATH -o $i $i
done

echo "All js and css files recursively within $dir have been compressed!"

当I.R.C.R.I.R.R.I.R.I.R.I.R.I.R.R.I.R.I.R.R.I.R.R.I.R.R.I.R.R.R.I.R.R.R.I.R.R.R.I.R.R.I.R.R.R.I.R.R.R.I.R.R.R.I.R.R.R.I.R.R.R.R.I.R.R.R.R.I.R.R.R.R.I.R.R.R.R.R.R.I.R.R.R.R.R.R.R.I.R.R.R.R.R.R.R.R.R.I.R.R.R.R.R.R.R.R.R.I.R.R.R.R.R.R.R.R.R.I.R.R.R.R.R.R.R.R.R

但是,尽管有这样的错误,但还是有这种错误。

能够 任何机构都说明为何由于我没有这样做而出现这一错误。

问题回答

The problem is that your script changes to the directory www/code/build/b2b_dev/build/web. It then tries to look for the jar www/code/build/b2b_dev/yuicompressor-2.3.5.jar relative to the current directory and cannot find it.

我建议采用绝对的道路。

例:

BASE_DIR=/full/path/to/www/code/build/b2b_dev
YUI_PATH=${BASE_DIR}/yuicompressor-2.3.5.jar
DIR=${BASE_DIR}/build/web

如果你必须使用相对途径,则改为:

DIR=www/code/build/b2b_dev/build/web
YUI_PATH=../../yuicompressor-2.3.5.jar




相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签