Anonymous user
Execute a system command: Difference between revisions
added PowerShell
(→{{header|D}}: add implementation) |
(added PowerShell) |
||
Line 455:
sysobey('ls');
=={{header|PowerShell}}==
Since PowerShell is a shell, running commands is the default operation.
<lang powershell>dir
ls
Get-ChildItem</lang>
are all equivalent (the first two are aliases for the third) but they are PowerShell-native commands. If one really needs to execute <code>dir</code> (which is no program but rather a built-in command in <code>cmd.exe</code>) this can be achieved by
<lang powershell>cmd /c dir</lang>
=={{header|Prolog}}==
|