I have a file with extention .sh(shell script). I need execute this file in ssis using execute process task. how can i do this. Please help me!!! Code inside .sh file :echo SSIS test >> /home/junaib/test/sql.txt (for testing)
Asked
Active
Viewed 1,391 times
0
-
You need an environment with a shell interpreter. So you will need a Linux/Unix environment. – Raman Sailopal Nov 23 '20 at 11:26
-
I have enabled WSL in my windows 10 – junaib Nov 23 '20 at 11:40
-
So open a bash shell and run the script with ./ You will need to create a /home/junaib/test directory with the relevant sql.txt file in there or change the path in the script, – Raman Sailopal Nov 23 '20 at 12:33
-
is it possibe to execute through ssis? – junaib Nov 23 '20 at 13:18
1 Answers
0
If you enabled WSL and you sure that the commands work from command line then you can run the command on cmd.exe with the /c flag
Executable : cmd.exe
Arguments : /c "BASH C:\SO\test.sh"

Ockert
- 425
- 4
- 6
-
Hi I am tried with above code, but unfortunately getting error for me. Error:[Execute Process Task] Error: In Executing "cmd.exe" "/c "BASH C:\temp\priya.sh"" at "C:\temp", The process exit code was "1" while the expected was "0". – junaib Nov 24 '20 at 05:24
-
Argument: /c "BASH C:\temp\priya.sh"| Executable: cmd.exe Working directory :C:\temp – junaib Nov 24 '20 at 05:41
-
@junaib can you open cmd.exe and run the command? Exit code 1 means that the the bash command returned an error for some reason – Ockert Nov 24 '20 at 06:29
-
Executed.Got error C:\>/c "BASH C:\temp\priya.sh" '/c' is not recognized as an internal or external command, operable program or batch file. – junaib Nov 24 '20 at 08:06
-