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

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_20
X-Spam-Check-By: sourceware.org
X-SBRS: None
X-IRP-Internal: 1
X-IRP-FugroSender: 200661
MIME-Version: 1.0
Subject: How to write to shared memory?
Date: Wed, 20 Oct 2010 14:21:11 +0800
Message-ID: <920A317C2D76254E86C6E44651E5FCBD017963EA@geoteamfs.faus.local>
From: "Cameron, Barrett" <b DOT cameron AT fugromcs DOT com DOT au>
To: <cygwin AT cygwin DOT com>
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

Hi,
I have a bash loop which I have significantly sped up by using:

for ((i=3D0;i<=3DZ;i++)); do echo $i; done

instead of other format for loops as well as using internal math like:

NEWX=3D$(($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=20

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??=20

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

- Raw text -


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