tags:

views:

45

answers:

1

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
i did nt get u cud you repeat again
Amit singh tomar
salil how to do that man
Amit singh tomar
ok i edit my answer nw you can check it by creating sample ruby file.
Salil
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