There are many shells available for the UNIX operating system. Among them are sh (bourne), csh (C), tsch (korn) and bash (bourne again) Shells.
With all these shells, sometimes we can mix all the syntax when assigning values to a variables. Here’s is another review so you wont forget:
C Shell (csh) or Korn (tcsh):
hostname# setenv LD_LIBRARY_PATH /usr/local/lib
hostname# setenv MYVAR /usr/mydir
$PATH before and after:
hostname# echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin
hostname# setenv PATH ${PATH}:/usr/local/local/bin
hostname# echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/local/bin
For Bash (bash), Bourne (sh) or Korn (tcsh):
EDITOR=vi
export EDITOR
Study the syntax and let’s discuss…
Nice tip, thanks!