#!/path/to/shell [ argument ]

来源:互联网 发布:struts2拦截器sql注入 编辑:程序博客网 时间:2024/05/06 13:20
  1. #!/path/to/shell[ argument ]
  2. where /path/to/shell might be/bin/sh,/usr/local/bin/bash
  3. This line is only interpreted by the operating system. Thatis,
  4. if a shell script (test.sh)is executable and run from the
  5. command line by typing its name and giving the script as an
  6. argument, as in
  7. $ sh test.sh
  8. then sh interprets test.sh.For sh, the shebang lineis simply a
  9. comment, andis ignored $ sh test.sh
  10. 选择的解释器
  11. echo $SHELL
原创粉丝点击