Deutsch   English   Français   Italiano  
<ln7313Fc93dU1@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Frank Winkler <usenet@f.winkler-ka.de>
Newsgroups: comp.unix.shell
Subject: Re: Different variable assignments
Date: Tue, 15 Oct 2024 13:46:42 +0200
Lines: 31
Message-ID: <ln7313Fc93dU1@mid.individual.net>
References: <lmt83dFsvbvU3@mid.individual.net>
 <lmt90sFr1idU1@mid.individual.net> <lmta1jFsvc0U1@mid.individual.net>
 <vecl6n$d0r$1@dont-email.me> <lmuniuF632tU1@mid.individual.net>
 <vedlc2$4vi6$1@dont-email.me> <vedofj$5g3v$1@dont-email.me>
 <lmvkisF860uU2@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ZPQYovjhPKV8C966coq5wAo5LpOen0558rcoHelBN+w1bA4zDa
Cancel-Lock: sha1:DMRyUObRDIN/5y0aWBbxgaqIDGM= sha256:lbQUPH7TBh1x+xNA1kN9Byjun/RBVUM5UaA7MBgBppw=
User-Agent: Mozilla Thunderbird Beta
Content-Language: en-US
In-Reply-To: <lmvkisF860uU2@mid.individual.net>
Bytes: 1846

On 12.10.2024 17:57, I wrote:

  >I think you're right. But why doesn't it work in ksh?

BTW: in an interactive ksh, the example does work:

$ input=$(tty) && echo 123456789 | tee $input | grep -o 456 | tee $input 
| read myvar && echo "myvar is $myvar"; input= ; myvar=
123456789
456
myvar is 456
$

And it also does when I put this into a ksh script.

The thing in question does

tty=`tty`
sudo openconnect -b ... |\
   tee $tty | grep "^Session authentication will expire at" |\
   cut -d ' ' -f 7- | read end

and this completely fails. Terminal output is missing, $end is empty and 
the whole command doesn't seem to work. Without the last two lines, it's 
working perfectly.
"sudo" also doesn't seem to be the problem as simple tests are working.

Regards

	fw