Stata 15 help for xshell

[D] shell -- Temporarily invoke operating system


{shell|!} [operating_system_command]

winexec program_name [program_args]

{xshell|!!} [operating_system_command]

Command availability:

Stata for ... Command Windows Mac Unix(GUI) Unix(console) ------------------------------------------------------------- shell X X X X winexec X X X - xshell - X X - -------------------------------------------------------------


shell (synonym: "!") allows you to send commands to your operating system or to enter your operating system for interactive use. Stata will wait for the shell to close or the operating_system_command to complete before continuing.

winexec allows you to start other programs (such as browsers) from Stata's command line. Stata will continue without waiting for the program to complete.

xshell (Stata for Mac and Unix(GUI) only) brings up an xterm in which the command is to be executed.

Remarks for Mac users

On macOS, xterm is available when X11 is installed. To install X11, you must first download XQuartz from


. shell (enter operating system)

. shell erase *.log (Windows) . shell rm *.log (Unix and Mac)

. shell edit myfile.ado (assuming editor called edit)

. !

. !edit myfile.ado

. winexec notepad

. winexec notepad c:\dta\

. winexec c:\windows\notepad

. winexec c:\windows\notepad c:\dta\

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index