It is currently Mon, 04 Mar 2024 01:47:52 GMT



 
Author Message
 local env. in tcsh
Hello everybody,

I am currently migrating from bash to tcsh as my standard
shell. Everything is to my satisfaction, but I miss one
feature of the good old bourne shell. How do I set a local
environment for a single command line. I.e. what is
the equivalen in tcsh/csh for the following line?

LD_PRELOAD=libumem.so UMEM_DEBUG=default,verbose ./myprog

TIA,
Tom



 Sun, 27 Jan 2008 15:58:26 GMT   
 local env. in tcsh
In article <ddcc31$n7...@wsc10.lrz-muenchen.de>, Thomas Maier-Komor <maier...@lpr.e-technik.no-spam.tu-muenchen.de> wrote:

comp.unix.shell may have been a better place to ask. :)

The answer is to use 'env' command. Example:

% echo $shell
/bin/tcsh

% echo $version
tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-linux) options
8b,nls,dl,al,kan,rh,color,dspm,filec

Proves this is tcsh.

% date
Wed Aug 10 08:09:13 GMT 2005

Shows current TZ is GMT.

% env TZ=EST5EDT date
Wed Aug 10 04:09:20 EDT 2005

Sets TZ to EST5EDT for one command only.

% date
Wed Aug 10 08:09:22 GMT 2005

Proves the TZ goes back to GMT afterwards.

-Dan



 Sun, 27 Jan 2008 16:11:20 GMT   
 local env. in tcsh

Prefix with "env":

env LD_PRELOAD=libumem.so UMEM_DEBUG=default,verbose ./myprog

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Sun, 27 Jan 2008 16:52:35 GMT   
 local env. in tcsh
Your answert was pretty fast and obiously exaclty
what I wanted, so I doupt it. But you are probably
right... ;-)

Thanks,

Tom



 Sun, 27 Jan 2008 17:03:11 GMT   
 local env. in tcsh

Please excuse this question, but why would you do that?

It's not like "why in god's name would you do /that/?", I'd just like to
know.

Whenever I asked people why they prefer tcsh to (arguably) more
feature-rich or grammatically consistent shells like bash, or even more so
zsh, they told me that they're used to tcsh, esp its syntax.

Now, this obviously doesn't apply to someone who is used to the bash...

lg, Bernd



 Tue, 29 Jan 2008 03:04:44 GMT   
 
   [ 5 post ] 

Similar Threads

1. /bin/tcsh vs /usr/local/bin/tcsh

2. global env. variables for tcsh

3. tcsh env variables

4. Wanted: List of TCSH ENV variables

5. Starting tcsh with custom env. in an xterm

6. ksh .profile/ENV question by tcsh user

7. lilo env variables not available in rc.local

8. Convert local time to gmt time without using TimeZone Env variable

9. Convert local time to gmt time without using TimeZone Env variable


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software