cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
1,169 Views
Registered: ‎09-08-2009

how can I run a shell script in a TCL file in Windows.

Jump to solution

in Windows

exec c:/projects/test/script.sh

does not work even though when I double click, the sh works. (sh includes mkdir and echo commands) 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
1,119 Views
Registered: ‎06-27-2018

Re: how can I run a shell script in a TCL file in Windows.

Jump to solution

Hi @999068709169 ,

In your .sh file pass both the in-built command with "exec cmd /c". For example:-

exec cmd /c mkdir new_dir6
exec cmd /c (echo Hello world)

and in the tcl console, simply source the .sh file without adding exec (ex: source new_script.sh). This should work. (refer to AR#59520)

Thanks,
Chinmay

View solution in original post

2 Replies
Highlighted
Scholar
Scholar
1,149 Views
Registered: ‎08-01-2012

Re: how can I run a shell script in a TCL file in Windows.

Jump to solution

a shell script is for linux. 

You probably want a windows version of bash : http://win-bash.sourceforge.net/

Otherwise I suspect the script was written for a linux environment.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
1,120 Views
Registered: ‎06-27-2018

Re: how can I run a shell script in a TCL file in Windows.

Jump to solution

Hi @999068709169 ,

In your .sh file pass both the in-built command with "exec cmd /c". For example:-

exec cmd /c mkdir new_dir6
exec cmd /c (echo Hello world)

and in the tcl console, simply source the .sh file without adding exec (ex: source new_script.sh). This should work. (refer to AR#59520)

Thanks,
Chinmay

View solution in original post