[X4U] Why does Bash do this?

Robert Nicholson robert at elastica.com
Mon Oct 10 14:06:52 PDT 2005


+ cat build.sh
#!/bin/sh
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
echo $JAVA_HOME


I'm confused about one feature of bash or /bin/sh under Tiger.

Why does it complain about blank lines?

sh build.sh
+ sh build.sh
/System/Library/Frameworks/JavaVM.framework/Home
: command not found
: command not found

those last two errors are because there's two blank lines at the end  
of the script.


More information about the X4U mailing list