how to universally source files



[TCL]
if {[string length [info procs {IS_LIST}]] == 0} then source
../cgi_globals.tcl
[/TCL]

I want to write this in such a way so that I can test on both Windows
and UNIX. How do I do that; it gives me "./cgl_globals.tcl: No such
file or directory" error in Windows but works in UNIX, but if I do
this:

if {[string length [info procs {IS_LIST}]] == 0} then source [file
join /cgi_globals.tcl]

Then I get the following error in both:

"/cgi_globals.tcl: No such file or directory"

So how do I write this to work in both UNIX and Windows? The file
"cgi_globals.tcl" exists in the same directory as the script using this
line.

Thanks
Phil

.



Relevant Pages

  • Re: How do Unix grep, find, sort?
    ... 1996 after starting Windows admin after many years in Unix, ... You could also inline the replace into one script ... Right now it is still much a roll your own world, in Windows ... do go down the road with some script language. ...
    (microsoft.public.windows.server.scripting)
  • Re: What is the more popular UNIX flavor?
    ... about my experience with Solaris and Cygwin. ... installing packages. ... needing eg tftp you only need to activate on a Unix system. ... probably need installing first on the equivalent Windows system. ...
    (comp.unix.questions)
  • Re: Five Architectural Flaws in Windows Solved In Mac OS X
    ... But it is still an improvement over Unix, wherein *any executable* can be highly privileged and interact with the user. ... The usual security precautions prevent unauthorized people from doing this, but that's true on Windows also. ... I just got thru upgrading the wifes Mac to Tiger and hpfs is the default. ... This is a more advanced design that Unixes have been trying to duplicate by adding thread support. ...
    (comp.sys.mac.advocacy)
  • Re: Linux no threat to Microsoft
    ... originally developed for Unix. ... Windows has't come on any of the machines I've ever purchased. ... Yet over those years Linux Market Share on the desktop has actually ... philosophy of Apple - later adopted by Microsoft. ...
    (comp.os.linux.setup)
  • Re: OS X "Security" myths
    ... >> lot of UNIX systems down to their knees. ... >>> their code, so they concentrate on developing exploits for Windows, ... > It does tell me that there is not much "boast factor" for malware ... Just like the Hackers convention in Las Vegas known as ...
    (comp.sys.mac.advocacy)