On Wednesday 25 April 2007 00:03, Vince Oliver wrote: > Hi All, > > I can not find any documentation on what is the difference when I > define some variable in .bashrc file like for example: > > COS_PATH=+$COSSPEC2D_DIR/pro:$COS_PATH > > and > > COS_PATH=$COSSPEC2D_DIR/pro:$COS_PATH > > (ie without +). Could somebody tell me?
The plus is not special. If present, it becomes part of the variable's value. > Also I am not sure when to export variables. Should I export it at > the end of .bashrc file or whenever the variable is changed? Or > perhaps once to export wherever in the file and not to warry about > changes in later? Exporting is completely independent of setting. All three of these techniques yield the same result: # A: ENV_VAR=value export ENV_VAR # B: export ENV_VAR ENV_VAR=value # C: export ENV_VAR=value I prefer the third form (C). The first (A) is the most classic. Some people think it odd to declare a variable exported before it's actually set (B). > thank you > oliver Randall Schulz -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
