cmccabe1
08-23-2016, 06:44 AM
I am trying to run a bash script in cygwin using an excel 2010 vba. In the code below I am getting a windows can not find "c:\cygwin\bin\bash.exe c:\cygwin\home\get_all_qc.sh", but that is the path to cygwin and the .sh. I have also tried "c:\cygwin\bin\bash.exe /cygwin/home/get_all_qc.sh" and got the same error. Basically what the script does is parse the 4 files in the directory and output the resutls to stdio which is read qMsg and displayed on sceen. The bash runs perfect in cygwin I am just not able to call it. Thank you :).
VBA
' LIST SCORES '
Dim qMsg As String
ChDrive "C"
ChDir "C:\aCGH"
Set objShell = CreateObject("Shell.Application")
qMsg = objShell.ShellExecute "c:\cygwin\bin\bash.exe c:\cygwin\home\get_all_qc.sh"
MsgBox "These are the qc scores: " & vbNewLine + qMsg
VBA
' LIST SCORES '
Dim qMsg As String
ChDrive "C"
ChDir "C:\aCGH"
Set objShell = CreateObject("Shell.Application")
qMsg = objShell.ShellExecute "c:\cygwin\bin\bash.exe c:\cygwin\home\get_all_qc.sh"
MsgBox "These are the qc scores: " & vbNewLine + qMsg