[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] [bash] sætte en variabel ien while-løkke



"Klaus S. Madsen" <sslug@sslug> writes:

> Derudover er grunden til at while løsningen ikke virker, at bash
> spawner en ny process til at køre "| while read" delen i. Det er detfor
> din variabel ikke bliver ændret uden for while løkken:
>
> http://www.aplawrence.com/Bela/2273.html

Hmprffff. Der står dog også at det burde virke i ksh. Desvære ser det
ikke ud til at virke i pdksh, manualsiden for pdksh siger også under
BUGS at:

       BTW, the most frequently reported bug is
               echo hi | read a; echo $a   # Does not print hi
       I'm aware of this and there is no need to report it.


Så...

-- 
 Peter Makholm     |        We constantly have to keep in mind why natural
 sslug@sslug |    languages are good at what they're good at. And to
 http://hacking.dk |     never forget that Perl is a human language first,
                   |                        and a computer language second


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *