我这里有个很简单的脚本
root@ubuntu:~/shell# vim hello.sh
!/bin/Bash
The first program
Author:jchen
echo -e “jchen is a superman!”
脚本里的echo -e “jchen is a superman!”在命令下正常的执行结果如下:
root@ubuntu:~/shell# echo -e “jchen is superman!”
jchen is superman!
这个脚本在bash和sh下执行结果有点不一样
root@ubuntu:~/shell# sh hello.sh
-e jchen is a superman!
root@ubuntu:~/shell# bash hello.sh
jchen is a superman!