How to write to shared memory?

Bengt-Arne Fjellner Bengt-Arne.Fjellner@ltu.se
Wed Oct 20 10:28:00 GMT 2010


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



More information about the Cygwin mailing list