1

I am trying to set the path of few libraries using source command but its not working and says

dsbisht@dsbisht-ThinkCentre-E73:~/Workstation$ source .list
bash: .list: No such file or directory

My list file is in Workstation directory.

below, are the path I have given in list file

export NETCDF=/home/dsbisht/Workstation/NETCDF413
export PATH=$NETCDF/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NETCDF/lib
export NCARG_ROOT=/home/dsbisht/Workstation/NCAR-NCL621
export PATH=$NCARG_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NCARG_ROOT/lib

I could not find the mistake as I am new to linux. How should I do that ?

1
  • 1
    Is the filename list or .list?
    – muru
    Dec 30, 2014 at 16:03

1 Answer 1

2

As muru suggests, your problem might just be a typo. If your file is called "list" you could source it using:

source list

or just

. list

Note the space between the . and the filename. A dot on its own is a synonym for "source ".

If your file is called ".list" (ie it is hidden), then:

source .list

or

. .list

is what you need.

3
  • I don't think files need to be executable in order to source them, do they? My ~/.bashrc isn't. Dec 30, 2014 at 16:47
  • You're right, I've edited my post accordingly.
    – harlandski
    Dec 30, 2014 at 17:27
  • Yeah.. error was coming because of simultaneous use of '.' and 'source' with 'list' file, its worked as "source list". Thanks for highlighting the mistake.
    – dsbisht
    Jan 2, 2015 at 11:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .