Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.shell > #25825

Re: Different variable assignments

Path csiph.com!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> (permalink)
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>
Xref csiph.com comp.unix.shell:25825

Show key headers only | View raw


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

Back to comp.unix.shell | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-11 20:11 +0200
  Re: Different variable assignments John-Paul Stewart <jpstewart@personalprojects.net> - 2024-10-11 14:27 -0400
    Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-11 20:45 +0200
      Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-12 03:59 +0200
        Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-12 02:26 +0000
          Re: Different variable assignments gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 10:45 +0000
            Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-19 14:25 +0200
              coprocs in bash & ksh (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 13:39 +0000
                Re: coprocs in bash & ksh (Was: Different variable assignments) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-19 15:57 +0200
        Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-12 09:42 +0200
          Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-12 07:51 +0000
          Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-12 13:08 +0200
            Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-12 12:01 +0000
              Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-12 17:57 +0200
                Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-12 17:09 +0000
                lastpipe (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 11:47 +0000
                Re: lastpipe (Was: Different variable assignments) Lem Novantotto <Lem@none.invalid> - 2024-10-19 12:53 +0000
                Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-12 21:32 +0000
                Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-12 23:47 +0200
                Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-12 21:50 +0000
                Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-12 23:56 +0200
                Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-12 23:07 +0000
                Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-12 23:10 +0000
                Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-12 23:39 +0000
                Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-15 13:46 +0200
                Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-24 11:30 +0200
                Re: Different variable assignments gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-24 11:21 +0000
                Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-24 23:43 +0200
                Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-25 06:57 +0200
                Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-10-24 22:45 +0000
                tee with no args is a no-op (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-25 07:10 +0000
                Re: tee with no args is a no-op (Was: Different variable assignments) Lem Novantotto <Lem@none.invalid> - 2024-10-25 08:57 +0000
            Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-12 17:49 +0200
        lastpipe (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 11:50 +0000
  Re: Different variable assignments Helmut Waitzmann <nn.throttle@xoxy.net> - 2024-10-11 22:20 +0200
    Re: Different variable assignments Frank Winkler <usenet@f.winkler-ka.de> - 2024-10-11 22:50 +0200
      Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-11 21:03 +0000
        Re: Different variable assignments gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 11:45 +0000
          Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-19 14:52 +0200
            coproc or whatever in bash and ksh (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 13:35 +0000
              Re: coproc or whatever in bash and ksh (Was: Different variable assignments) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-19 15:54 +0200
                Re: coproc or whatever in bash and ksh (Was: Different variable assignments) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-19 16:11 +0200
                Re: coproc or whatever in bash and ksh (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 14:52 +0000
            Re: Different variable assignments Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-19 21:42 +0000
              Re: Different variable assignments gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-19 22:56 +0000
                Re: Different variable assignments Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-20 07:09 +0200
                coprocs - again (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-20 09:12 +0000
                Re: coprocs - again (Was: Different variable assignments) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-25 06:26 +0200
                Re: coprocs - again (Was: Different variable assignments) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-25 04:35 +0000
                Re: coprocs - again (Was: Different variable assignments) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-25 07:03 +0200
                Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments)) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-25 08:10 +0000
                Re: Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments)) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-25 11:32 +0200
                Re: Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments)) Lem Novantotto <Lem@none.invalid> - 2024-10-25 11:15 +0000
                Re: Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments)) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-25 12:54 +0000
                Re: Subjective "valuations" are all we have (Was: coprocs - again (Was: Different variable assignments)) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-10-26 16:20 +0200
                Re: coprocs - again (Was: Different variable assignments) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-25 07:06 +0000
                How to do multiple concurrent coprocs in ksh (Was: coprocs - again (Was: Different variable assignments)) gazelle@shell.xmission.com (Kenny McCormack) - 2024-10-25 07:05 +0000
      Re: Different variable assignments Christian Weisgerber <naddy@mips.inka.de> - 2024-10-11 23:25 +0000
    Re: Different variable assignments gazelle@shell.xmission.com (Kenny McCormack) - 2024-11-15 10:58 +0000
      Re: Different variable assignments Lem Novantotto <Lem@none.invalid> - 2024-11-16 00:07 +0000

csiph-web