Execution of external commands or binaries is different in mshell. Instead of it being the main syntactical construct, in mshell you build up a list of arguments, and then at a time of your choosing, you execute it. For example:

['my-program' 'arg1' 'arg2'];

Often there are different things you want out of your execution, or you want different behavior depending on the exit code. mshell gives you full flexibility to decide with concise syntax.

To initiate execution, you use one of 3 operators:

['false']; # mshell will continue past this point
['true']! # Will execute and continue because of 0 exit code
['my-command']? exitCode!
$"Exit code was {@exitCode}" wl

The other choice you often have when executing commands is what to do with the standard output. Sometimes you will want to redirect it to a file, other times you will want to leave the contents on the stack to process further. For that, you use the > and * operators.

[yourCommand] `fileToRedirectTo` > ! # Redirects the output to the file.
[yourCommand] * > ! # Puts all of stdout on the stack as a string.