[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[linux-users:106992] Re: $B%Q%$%W(B$B%i%$%s$NESCf$N%3%^%s%I$N(B$B=*N;%9%F!<%?%9(B


$BFo:,$G$9!#(B
(B
(BSATO Hiroyuki wrote:
(B> $B%Q%$%W%i%$%s$NESCf$N%3%^%s%I$N=*N;%9%F!<%?%9$rCN$k$3$H$OIT2DG=$J$N$G$7$g$&$+!)(B
(B
(Bbash $B$G$h$1$l$P!"(B
(Bbash(1) $B$N(B SHELL GRAMMER $B@a$N(B Pipelines $B$N9`$K0J2<$N$h$&$J5-=R$,$"$j$^$9!#(B
(B
(B  The  return  status  of a pipeline is the exit status of the last command,
(B  unless the pipefail option  is  enabled.   If  pipefail  is  enabled,  the
(B  pipeline's  return  status is the value of the last (rightmost) command to
(B  exit with a non-zero status, or zero if all  commands  exit  successfully.
(B  If  the  reserved  word  !   precedes  a pipeline, the exit status of that
(B  pipeline is the logical negation of the exit status  as  described  above.
(B  The  shell  waits  for  all  commands  in the pipeline to terminate before
(B  returning a value.
(B
$BMW$9$k$K!"(B
(B  set -o pipefail $B$H$7$F$*$1$P!"(B
(B  $B$=$N%Q%$%W%i%$%sCf$G=*N;%9%F!<%?%9$,(B 0 $B$G$J$$%3%^%s%I$,$"$C$?>l9g!"(B
(B  $B$=$NCf$G0lHV1&$K$"$k%3%^%s%I$N=*N;%9%F!<%?%9$,JV$k(B
$B$H$$$&$3$H$G$9$M!#(B
(B
$B$3$l$O(B SUSv3 $B$N(B shell $B$N9`$K$O5-:\$,$J$$$N$G(B bash $B$NFH<+3HD%$C$]$$$G$9$M!#(B
(Bref.) http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_02
(B--
(BTakeshi Kusune <kusune@xxxxxxxxxxxxxx>

$B$3$N>pJs$,$"$J$?$NC5$7$F$$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$$>l9g$N@_Dj$K$D$$$F!W(B
References: