Overview
| Artifact ID: | aafc0b24cdc8e15341cc259112c5d81284c8d73e9351a9b68f91e02e81e6b54e |
|---|---|
| Ticket: | efd15d181ae9be3b538eb23534d37d8f1d96cd57
problem with % in [exec] on windows |
| User & Date: | bll on 2020-07-29 14:38:35 |
Changes
- icomment:
Testing on windows (win7/64) where tt.exe dumps the command line arguments it bll@win7-64 MINGW64 ~ $ cat tt.tcl set out [exec ./tt wmic process where {commandline like '%wmic%'} get processid,commandline] puts $out exit bll@win7-64 MINGW64 ~ $ /c/Users/bll/Desktop/BallroomDJ/windows/64/tcl/bin/tclsh.exe tt.tcl argc: 7 0: C:\msys64\home\bll\tt.exe 1: wmic 2: process 3: where 4: commandline like '%wmic%' 5: get 6: processid,commandline Printing the constructed command line out in the Tcl source: ds: C:\msys64\home\bll\tt.exe wmic process where "commandline like '"%"wmic"%"'" get processid,commandline So something, somewhere is stripping out those quotation marks that get added by Tcl. I really don't know what is stripping the quotation marks. The program should receive them. Obviously cmd.exe /c echo %programdata% does receive the quotation marks and displays them (as it should). It looks broken to me. - login: "bll"
- mimetype: "text/plain"