| Deutsch English Français Italiano |
|
<lmta1jFsvc0U1@mid.individual.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.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: Fri, 11 Oct 2024 20:45:07 +0200 Lines: 15 Message-ID: <lmta1jFsvc0U1@mid.individual.net> References: <lmt83dFsvbvU3@mid.individual.net> <lmt90sFr1idU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net bg4cWIE2Xs9Fm81KLz2QqAiZZghrHck2BZYtSmJm2SGF0wYRqK Cancel-Lock: sha1:EGv9RcbLxbBOwoQ/73qCCODoOls= sha256:xuP0+gAgAALXC6KxVTICQVtTPBXsGiuq9zV59xTdE2w= User-Agent: Mozilla Thunderbird Beta Content-Language: en-US In-Reply-To: <lmt90sFr1idU1@mid.individual.net> Bytes: 1399 On 11.10.2024 20:27, John-Paul Stewart wrote: >I don't know about other shells, but in Bash each command in a pipeline >is run in a subshell. (See the "Pipelines" section of the Bash man >page.) Thus you're doing the 'read var3' part in a different shell than >where 'echo $var3' runs. That's why it is empty when you echo it. That sounds very plausible - thanks for enlighting! :) So this is not a "read" issue but rather a matter of shell instance and hence there's no way to do the assignment at the end? Regards fw