LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 955|回复: 3

/usr/bin/$base & 这个&是什么意思?

[复制链接]
发表于 2009-12-15 16:56:14 | 显示全部楼层 |阅读模式
一个启动脚本,用到case语句
case "$1" in
  start)
                /usr/bin/$base &


esac

这段脚本中的  &到底是什么意思?
麻烦各位解释下。谢谢
发表于 2009-12-15 17:33:50 | 显示全部楼层
& 是指在后台运行。
回复 支持 反对

使用道具 举报

发表于 2009-12-15 17:43:26 | 显示全部楼层
man bash
  1.        If a command is terminated by the control operator &,  the  shell  exe‐
  2.        cutes  the command in the background in a subshell.  The shell does not
  3.        wait for the command to finish, and the return status is  0.   Commands
  4.        separated  by  a  ; are executed sequentially; the shell waits for each
  5.        command to terminate in turn.  The return status is the exit status  of
  6.        the last command executed.
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-15 18:55:39 | 显示全部楼层
知道了。感谢各位。
一直注重linux   C编程,突然发现,写linux下,shell编程也很有用,功能很强大。
呵呵,有时间研究下abs
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表