Re: open and backslashes...
From: Gerald W. Lester (Gerald.Lester_at_cox.net)
Date: 03/25/05
- Next message: Bruce Hartweg: "Re: open and backslashes..."
- Previous message: Don Porter: "Re: font used by tk_dialog not settable?"
- In reply to: Jeff Godfrey: "open and backslashes..."
- Next in thread: Bruce Hartweg: "Re: open and backslashes..."
- Reply: Bruce Hartweg: "Re: open and backslashes..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Mar 2005 16:46:37 -0600
Jeff Godfrey wrote:
> Hi All,
>
> Under WinXP, given a user supplied program command line, such as:
>
> set cmd {c:\path\to\myprog.exe -F 1 -G 2:2 -Q "a text parm"}
>
> What is the best/safest way to make the above "acceptable" to the open
> command, as in:
>
> open "|$cmd"
>
> It seems that I need to convert the (possible) backslashes in the exe path
> to forward slashes for open, but I don't want to break anything else in the
> supplied command line. Also, I suppose the exe path could contain spaces...
>...
set cmdList [split $cmd]
lset cmdList 0 [file normalize [lindex $cmdList 0]]
set cmd [join $cmdList]
-- +--------------------------------+---------------------------------------+ | Gerald W. Lester | "The man who fights for his ideals is | | Gerald.Lester@cox.net | the man who is alive." -- Cervantes | +--------------------------------+---------------------------------------+
- Next message: Bruce Hartweg: "Re: open and backslashes..."
- Previous message: Don Porter: "Re: font used by tk_dialog not settable?"
- In reply to: Jeff Godfrey: "open and backslashes..."
- Next in thread: Bruce Hartweg: "Re: open and backslashes..."
- Reply: Bruce Hartweg: "Re: open and backslashes..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|