J
Junmin Liu
does anyone know how the shell function work in Mac?
show me an example will be great
thanks,
show me an example will be great
thanks,
Junmin Liu said:does anyone know how the shell function work in Mac?
show me an example will be great
Junmin Liu said:but i try the example:
RetVal = Shell("Macintosh HD:Applications:Calculator", vbNormalFocus)
MsgBox RetVal
I got "0" returned, which means it doesn't work
actually i really want to do is to use shell to execute some perl
scripts, e.g.:
RetVal = Shell("Macintosh HD:usr:binerl myperl.pl", vbNormalFocus)
Junmin Liu said:how to pass the parameter in?
Dim st As String
st = "argus"
MacScript("do shell script ""/usr/bin/perl myperl.pl" + st + """)
Junmin Liu said:the output I got is different from I do it in terminal:
env | grep PATH
JE McGimpsey said:do shell script uses the sh shell, not bash. For help in sending do
shell script commands, see
http://developer.apple.com/technotes/tn2002/tn2065.html
which includes this note:
Q: What shell does do shell script use, really?
A: do shell script always calls /bin/sh. However, in Mac OS X, /bin/sh
is really a copy of another shell that emulates sh. In 10.2 and later,
this is bash; prior to that it was zsh.
JE McGimpsey said:So when sh is emulated by bash, are bash's environment variables
emulated too?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.