[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



Anders Melchiorsen <sslug@sslug> writes:

> Fordelen ved at bruge "find" i en pipe (og ikke en "command
> substitution") er i øvrigt at "while" så kan starte mens "find" stadig
> finder filer. Det kan have relevans hvis der skal søges i store træer.

Netop.

> Endvidere undgår man det buffer-problem, der kan opstå, hvis der
> findes flere filer end kommandolinjen kan indeholde.

Det var også en af mine tanker. Jeg prøvede dog på mit news-spool, det
virkede tilsyneladende men bash begyndte at bruge over 300MB
hukommelse.


Men jeg hentede ksh93 og den opfører sig som jeg ønsker:

$ echo hello world | read p ; echo $p        
hello world
$ 

-- 
 Peter Makholm     |                                              What if:
 sslug@sslug |                Tanenbaum had convinced Linus that his
 http://hacking.dk |                  operating system really was obsolete


 
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] *