Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1719555
  • 博文数量: 362
  • 博客积分: 10587
  • 博客等级: 上将
  • 技术积分: 4098
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-10 18:15
文章分类

全部博文(362)

文章存档

2014年(1)

2013年(58)

2011年(115)

2010年(112)

2009年(76)

分类:

2010-09-25 15:39:19

#!/bin/rm
# Self-deleting script.

# Nothing much seems to happen when you run this... except that the file disappears.

WHATEVER=85

echo "This line will never print (betcha!)."
touch /home/hehehehe.txt

exit $WHATEVER  # Doesn't matter. The script will not exit here.
                # Try an echo $? after script termination.
                # You'll get a 0, not a 85. 

# 大家觉得这个有意义吗?用在哪里。请知道的告诉我下,谢谢。

Also, try starting a README file with a #!/bin/more, and making it executable. The result is a self-listing documentation file. 

To avoid this possibility, a script may begin with a  #!/bin/env bash sha-bang line. This may be useful on UNIX machines where bash is not located in /bin

阅读(771) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~