Using ecosadmin.tcl with the latest Cygwin Tcl shell

John Dallaway jld@ecoscentric.com
Tue Jan 28 16:22:00 GMT 2003


Hi Jifl

Thanks for your effort in getting $@ to work in this context. Here's my 
final solution in the form of a test script:

#!/bin/sh
# \
exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \
        if ( echo | $tclshell ) 2> /dev/null ; then \
            exec $tclshell "$0" "$@" ; \
        fi \
    done ; \
    echo "Cannot find Tcl shell" ; exit 1 \
    ' "$0" "$@"

puts "argv0 = $argv0"
foreach arg $argv {
    puts "arg = $arg"
}

John

-----Original Message-----
From: Jonathan Larmour
Date: Tuesday 28 Jan 2003 02:44
Subject: Re: Using ecosadmin.tcl with the latest Cygwin Tcl shell

> The following test script works:
>
> #!/bin/sh
> # \
> exec sh -c 'if ( echo | cygtclsh80 ) 2>/dev/null ; then \
>        exec cygtclsh80 "${0}" "$@" ; \
> fi' "$0" "$@"



More information about the Ecos-patches mailing list