script: writing text without newline

Henrique Barbosa hmjbarbosa at GMAIL.COM
Tue May 10 14:15:34 EDT 2005


Lifeng,

That almost worked... but unfortunately things written to the
screen using "prompt" wait until some carriage return arrives
in order to show up.

I seems there is a buffer somewhere holding the
content until the next newline. Maybe grads is doing it,
maybe it is my shell.

Any help is welcome.

Henrique

On 5/10/05, Lifeng Luo <lluo at princeton.edu> wrote:
> Try prompt.
>
> -Lifeng
>
> Henrique Barbosa wrote:
> > Hi All,
> > Anybody know how can we "say" a text without a newline?
> >
> > I have a script which loops through x and y, and I want
> > to output something for each grigpoint, however, for all y in the
> > same line. Something like:
> >
> > ga-> my_script.gs
> > x1 & y1 y2 y3 y4 ....
> > x2 & y1 y2 ...
> > ...
> >
> > The script looks like this:
> >
> > x=1
> > while (x<xmax)
> >   'set x 'x
> >   say 'x'x' & '
> >
> >   y=1
> >   while (y<ymax)
> >     'set y 'y
> >     say 'y'y' '
> >
> >     (...) some time consuming calculation
> >
> >      y=y+1
> >   endwhile
> >   x=x+1
> > endwhile
> >
> > The problem is that the command [say] always add a new line,
> > and the output ends up like:
> >
> > ga-> my_script.gs
> > x1 &
> > y1
> > y2
> > ...
> >
> > Any sugestions?
> >
> > Henrique Barbosa
>
>



More information about the gradsusr mailing list