hii,, i would like to know to how to use system("clear") in ruby . i made a programme like puts "amit" system("clear") i am using scite as compiler and i want console to be cleared after executing this commnad here its not working. plzzz help me
A:
You can use following create a ruby file say check.rb like follwing
puts "amit"
#system "clear"
and run it from console [Salil@localhost Desktop]$ check.rb
o/p
[Salil@localhost Desktop]$ ruby check.rb
amit
[Salil@localhost Desktop]$
now modify check.rb and run it from console
puts "amit"
system "clear"
o/p
[Salil@localhost Desktop]$
Salil
2010-07-03 06:38:46
i did nt get u cud you repeat again
Amit singh tomar
2010-07-03 06:53:07
salil how to do that man
Amit singh tomar
2010-07-03 06:55:46
ok i edit my answer nw you can check it by creating sample ruby file.
Salil
2010-07-03 07:03:18
but still its nt working why very first its nt workingthere is no other way to clear console at very first time
Amit singh tomar
2010-07-03 07:07:59