RosettaCodeData/Task/Execute-a-system-command/V-(Vlang)/execute-a-system-command.v
2023-07-01 13:44:08 -04:00

7 lines
156 B
V

import os
fn main() {
result := os.execute('cmd /c dir')
if result.output !='' {println(result.output)}
else {println('Error: not working') exit(1)}
}