delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/20/03:02:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4CBE93E1.3040001@ltu.se>
Date: Wed, 20 Oct 2010 09:01:53 +0200
From: Bengt-Arne Fjellner <Bengt-Arne DOT Fjellner AT ltu DOT se>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to write to shared memory?
References: <920A317C2D76254E86C6E44651E5FCBD017963EA AT geoteamfs DOT faus DOT local>
In-Reply-To: <920A317C2D76254E86C6E44651E5FCBD017963EA@geoteamfs.faus.local>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 2010-10-20 08:21 , Cameron, Barrett wrote:
> Hi,
> I have a bash loop which I have significantly sped up by using:
>
> for ((i=0;i<=Z;i++)); do echo $i; done
>

Does

for ((i=0;i<=Z;i++)); do echo $i; done>  $OUT

Help? It at least avoids reopening the file every time.


> instead of other format for loops as well as using internal math like:
>
> NEWX=$(($EAST+$DX))
>
> Instead of let or expr. This process is now heaps faster but I want to
> echo the data to a file but not have to write to a file on each loop
> cycle as it slows it down.
>
> On native linux you would write:
>
> echo $NEWX>  /dev/shm/new
>
> and then at the end of all the loops at the end of the script write to a
> file with:
>
> cat /dev/shm/new>  $OUT
>
> -->  Finally to the question. How do you do this with Cygwin??
>
> Cheers,
>
> Barrett.
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019