Anonymous user
Execute a system command: Difference between revisions
→{{header|Go}}: library change
(→{{header|UNIX Shell}}: Important fixes: `ls` is Bourne Shell, $(ls) is Korn Shell.) |
(→{{header|Go}}: library change) |
||
Line 223:
func main() {
cmd := exec.Command("ls", "-l")
output, err := cmd.Output()
if (err != nil) {
fmt.Println(err)
return
}
fmt.Print(string(output))
}</lang>
|