On Mon, May 01, 2006 at 09:49:49AM -0700, Stewart Stremler wrote:
> begin  quoting James G. Sack (jim) as of Sun, Apr 30, 2006 at 07:20:59PM 
> -0700:
> [snip]
> > 1) if you wish a script to be useful in a variety of environments..
> >   use #!/usr/bin/env prog
> 
> I really must remember to do that.  I'm in the habit of customizing
> scripts to the machine, rather than trying to write a script that will
> run everywhere... if I want run-everywhere, I tend to reach for Java.
> 
> I know TCL and perl are basically ubiquitous... they just don't FEEL
> that way to me.  I haven't internalized that knowledge.
>  

Tcl more than perl in my experience. We use a M$ port (no _by_ M$) of
perl at my job and get a lot of work out of it, but it has blind spots
where valid perl just doesn't work. Fortunately, in perl TIAAWTDI.

In Tcl I have as yet to change a single line of code in any program that
I move over. The commands even automagically handle path name
differences. Cross platform issues do exist, and are well discussed in
the good Tcl books, even without the sneering at M$ that it so richly
deserves.

There is a shebang in Tcl (it may be a custom elsewhere) that works in
all OSs:

#! /bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"

In Unix, the first line executes the third line. In M$, the first line
is ignored as a comment and the third line kicks itself off.

-- 
Lan Barnes                    [EMAIL PROTECTED]
Linux Guy, SCM Specialist     858-354-0616
Tcl/Tk Enthusiast 


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to