actually, that doesn’t work either (it gives ERROR: could not spawn ‘ls;’ ls: no such file or directory (ENOENT)). The reason is that ; is a shell feature, and Julia commands aren’t run through the shell at all. That’s also why globbing, $-expansion, and aliases don’t work in Julia commands.
I wanted to call them in the same spawn process. So actually, spawn(ls; ls). It isn’t the end of the world if this doesn’t work, but I figured there was just some simple thing I was missing.
Thanks!
I encounter a similar problem as yours, my solution is to create an iobuffer to emulate a script, and run the script. For instance, we want to run powershell commands to sleep a computer through Julia, we know the working powershell commands like