This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to write to shared memory?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]