3
-b在bash shebang中做什么?
我有以下bash脚本: #!/bin/bash -e egrep "^username" /etc/passwd >/dev/null if[ $? -eq 0 ] then echo "doesn't exist" fi 没有-e,该脚本将无法运行。什么是-e这个脚本呢?另外,$?在这种情况下该怎么办?
与其他Bourne / POSIX shell相对,GNU的Bourne Again SHell特有的问题。对于一般关于Unix shell的问题,请改用/ shell标记。