Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SETENV: Bad : modifier in $ ($)

Tags:

linux

tcsh

setenv

I am using the tcsh terminal in Linux. In the other terminal I normally used I set the path to some license file as follows:

  export PATH="$PATH:$MODEL_TECH"

Tcsh shell does not recognise this command so I tried the following:

  setenv PATH "$PATH:$MODEL_TECH"
  set PATH "$PATH:$MODEL_TECH"
  setenv PATH=("$PATH:$MODEL_TECH")

But then I always get the following error:

Bad : modifier in $ ($).

What be also great if someone could help me here out quickly, tried quite a few combinations but nothing works.

like image 750
reinhard Avatar asked Mar 07 '11 11:03

reinhard


3 Answers

Drop the =

setenv LICENSE_FILE "/usr/local/softwarex/license.dat"

From the man page for tcsh:

   setenv [name [value]]

   Without  arguments, prints the names and values of all environ‐
   ment variables.  Given name, sets the environment variable name
   to value or, without value, to the null string.
like image 108
codaddict Avatar answered Sep 24 '22 13:09

codaddict


Put curly braces around the variable names:

setenv PATH ${PATH}:${foo}

or use this form:

set path = ($path $foo)
like image 22
Dennis Williamson Avatar answered Sep 21 '22 13:09

Dennis Williamson


Try setenv LICENSE_FILE /usr/local/softwarex/license.dat. This should be documented in the man page somewhere on your system, so try reading up in man tcsh; tcsh is a very different beast from bash and friends. If the relevant man page isn't available on your system for some reason, here's the first man tcsh I found.

like image 2
Hank Gay Avatar answered Sep 22 '22 13:09

Hank Gay