From: Ross Bamford Date: 2006-01-04T19:17:58+09:00 Subject: Re: Is there a way to clear the contents of a terminal? On Wed, 04 Jan 2006 10:01:56 -0000, Ross Bamford wrote: > On Wed, 04 Jan 2006 06:49:14 -0000, John Maclean > wrote: > >> Hi Chaps, >> >> MATLAB uses cls, in a bash shell I'd use clear. Is there a way to clear >> the contents of a terminal -safely-? >> > > Safe, sure, reliable, probably not. But on most 'modern' systems I guess > this should work: > > puts "\e[2J" > or "\e[2J\e[0;0H" to home the cursor too. -- Ross Bamford - rosco@roscopeco.remove.co.uk