How to run a DOS command?

93 views
Skip to first unread message

KK Sasa

unread,
Jul 31, 2014, 11:54:39 PM7/31/14
to julia...@googlegroups.com
Is there command like R's command 「system」

     system("XXX.bat")

or Matlab's 「dos」in Julia?

     dos('XXX.bat','-echo');


I have checked http://julia.readthedocs.org/en/latest/manual/running-external-programs/, but still don't understand how to call DOS.

Thanks.

John Myles White

unread,
Jul 31, 2014, 11:55:33 PM7/31/14
to julia...@googlegroups.com
run(`XXX.bat`)

— John

KK Sasa

unread,
Aug 1, 2014, 12:01:52 AM8/1/14
to julia...@googlegroups.com
Thank you, John.

The problem is that I use「'」 rather than 「`」, maybe the document should indicate this clearly.


John Myles White於 2014年8月1日星期五UTC+8上午11時55分33秒寫道:

John Myles White

unread,
Aug 1, 2014, 12:05:03 AM8/1/14
to julia...@googlegroups.com
The very first sentence of the section you referenced is the following:

"Julia borrows backtick notation for commands from the shell, Perl, and Ruby.”

How would you rewrite that sentence to make it more clear that you will need to use backticks? Is the problem that the word backtick is unfamiliar? Or that the systems referenced (shell, Perl, Ruby) are unfamilar?

— John

KK Sasa

unread,
Aug 1, 2014, 12:12:10 AM8/1/14
to julia...@googlegroups.com
Thanks for pointing out this.

My English is not good, so I didn't know this word backticks and where it is on the keyboard.

John Myles White於 2014年8月1日星期五UTC+8下午12時05分03秒寫道:

John Myles White

unread,
Aug 1, 2014, 12:13:29 AM8/1/14
to julia...@googlegroups.com
Maybe we should put a quoted backtick in that sentence right after the word backtick first occurs?

 — John

KK Sasa

unread,
Aug 1, 2014, 12:24:22 AM8/1/14
to julia...@googlegroups.com
It should be more helpful. :)

John Myles White於 2014年8月1日星期五UTC+8下午12時13分29秒寫道:
Reply all
Reply to author
Forward
0 new messages