From: Fred Phillips Date: 2008-08-11T07:19:27+09:00 Subject: Re: "puts" without line feed --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon Aug 11 04:27:56 2008, Bob Miner wrote: > uze guyz are SO close. >=20 > Print gives me >=20 > 123456.......*to a new line*.......*to another new line*..... >=20 > I'm tryin for >=20 > 1 >=20 > then >=20 > 2 (where 1 was) >=20 > then >=20 > 3 (where 1, then 2 were) >=20 > so it rolls along "in place" >=20 > Kinda silly, I know.....I guess I should be happy the darn thing runs &= =20 > does what I want at all, eh? > Thanks for kind & timely responses. You need to flush $stdout and move to the beginning of the line each time: jump =3D "\r\e[0K" # That is return to beginning of line and use the # ANSI clear command "\e" or "\003" =20 (1..10).each do |i| print jump + i sleep 1 $stdout.flush end That should sort you. --=20 Fred O. Phillips http://fophillips.org BBC7 7572 755F 83E0 3209 504A E4F7 874F 1545 9D41 --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkifafMACgkQ5PeHTxVFnUFRzACfc9ABFpamlBwJznbhXXMNEb/P 8uYAmwby/oDxwsBJbSHgX6TnjJukxt6y =+TNY -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--