help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading from external command


From: Alex fxmbsw7 Ratchev
Subject: Re: reading from external command
Date: Thu, 31 Mar 2022 10:43:32 +0200

no idea why there are in my version two 44 exit pids
maybe chet can clear up in time

bash peng ; printf \\n ; cat p ; printf \\n ; cat peng

2534
0
41
44
44

2535
2536
2537

#!/bin/bash

printf $BASHPID\\n

>p
 while read -r x ; do
>/dev/null printf %s\\n <( printf $BASHPID\\n >>p ; exit 44 )
 done < <( printf $BASHPID\\n >>p ; printf shit\\nbla\\n ; exit 41 )

printf $?\\n

 while read -r p ; do
wait $p
echo $?
 done <p


reply via email to

[Prev in Thread] Current Thread [Next in Thread]