[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

A tcl question.



* The problem: 
I want an existent tcl/tk program to get a default value for the MANPATH 
environment variable when it is called even when the environment does not 
define it, and without changing the env. Further more, I rather prefix the 
program code then write a wrapper script.

* My suggestion: 
To prefix the existent program with the lines:
if {![info exists env(MANPATH)] || [string equal [string trim $env(MANPATH)] 
""]} {
set env(MANPATH) [ exec /usr/bin/manpath ];}

* The question:
Is this a reasonable || good || bad solution?

* Reason for asking: 
I am new to tcl.

-- 
	
	--  Shaul Karl <shaulk@israsrv.net.il>

	Donate free food to the world's hungry: see http://www.thehungersite.com




Reply to: