LinuxSir.cn,穿越时空的Linuxsir!

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

ksh中"|&"是什么意思啊?

[复制链接]
发表于 2008-1-8 16:53:59 | 显示全部楼层 |阅读模式
下面是man手册中说的:
<code>
The symbol |& causes     asynchronous  execution  of  the preceding command or  pipeline  with  a two-way pipe established to the parent shell.
</code>
可我还是不明白,哪位能用一个例子来说明问题,谢谢!
 楼主| 发表于 2008-1-8 16:55:31 | 显示全部楼层
那段英文的意思我懂,就是不知道怎么用
回复 支持 反对

使用道具 举报

发表于 2008-1-8 17:15:19 | 显示全部楼层
  1. #!/bin/ksh
  2. #
  3. bc -l|&
  4. echo -n "please input two number:"
  5. read a b
  6. print -p "$a*$b"|print -p "scale=2;$a/$b"|print -p "$a+$b"|print -p "$a-$b"
  7. read -p c;read -p d;read -p e;read -p f
  8. echo "$a*$b=$c\n$a/$b=$d\n$a+$b=$e\n$a-$b=$f"
复制代码


http://www.linuxsir.cn/bbs/thread222708-2.html
置顶贴中有。
回复 支持 反对

使用道具 举报

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

本版积分规则

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