The question is as follows:

I would like to have one file (Ruby) at the start of which a terminal will open in which you can write a message or simply launch some other program.

Maybe someone already faced this task ...

    3 answers 3

    There are many ways: one , two , three , four , five (thanks, @Jarto), six .

      +1 five

      exec([env,] command... [,options]) 

      Given external command.

      • could just add a comment. - Axifive
       class String def pr puts self self end end # 'qwerty'.pr class String def eval Kernel.eval self end end # '`ping ru.stackoverflow.com`'.eval. # encode("windows-1251").pr.force_encoding("cp866").pr # '`ls`'.eval.pr # '`dir`'.eval.pr # '`ruby -v`'.eval.pr # '`whoami`'.eval.pr # '`echo "hello world"`'.eval.pr # '`php --ini`'.eval.pr # '`curl ru.stackoverflow.com`'.eval.pr 

      https://www.youtube.com/watch?v=2-Lw36EhIEg

      enter image description here