在调查ranger为什么不能正确判断mimetype的时候,发现scope.sh里用到一个我没见过的变量PIPESTATUS,所以这里稍微总结下。

Bash里的帮助是这样说的

An array variable containing  a list  of exit status values from the processes in the  most-recently-executed foreground pipeline (which may contain only a single command).

一个随便的例子

>>> echo abc | grep  "a" | grep  "d" | echo 23
23

>>> echo ${PIPESTATUS[*]}
0 0 1 0

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-08-27
  • 2022-12-23
  • 2021-10-07
  • 2021-10-13
猜你喜欢
  • 2021-04-07
  • 2021-09-09
  • 2022-01-13
  • 2021-10-25
  • 2021-08-28
  • 2021-08-22
  • 2021-12-08
相关资源
相似解决方案