Sujet : Re: Different variable assignments
De : Lem (at) *nospam* none.invalid (Lem Novantotto)
Groupes : comp.unix.shellDate : 24. Oct 2024, 23:45:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vfeimj$2qggf$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.160 (Toresk; )
Il Thu, 24 Oct 2024 11:30:34 +0200, Frank Winkler ha scritto:
Maybe some effect of the background option?
I guess it could be so.
However, since I don't use openconnect I could only try something like:
| $ openconnect -b unresponsive:local:ip:address | tee | grep .
| POST
https://192.168.38.38/| Failed to connect to host 192.168.38.38
| Failed to open HTTPS connection to 192.168.38.38
| Failed to complete authentication
| Failed to connect to 192.168.38.38:443: Nessun instradamento per l'host
which works, and in bash gives me the stderr printed by openconnect - the
three lines in the middle - and the stdout (piped from openconnect to tee
and then from tee to grep) printed in red by grep - first and last line).
In ksh no red color, but it works the same.
Then, in standard bash:
|$ openconnect -b 192.168.38.38 2>&1 | tee | grep -o POST |read end ; \
|> echo $end
|
whilst in ksh:
|$ openconnect -b 192.168.38.38 2>&1 | tee | grep -o POST |read end ; \
|> echo $end
POST
Again, it works as expected. So I didn't come to anything useful. Sorry.
-- Bye, Lem