Discussion:
Bash/csh path problem
(too old to reply)
Sapna Mishra
2016-03-20 11:32:22 UTC
Permalink
Hi all,

Can any one tell me how to add a path in .bashrc file of a directory say Idl which contains so many sub directories such that when I do source .bashrc it is able to run all the codes and scripts inside all the different sub directories there???
Is it possible? I am doing

IDL_PATH=.:+/idl/idl70/lib:/home/cs/Idl .... The Idl folder is having many sub-directories (eg. xidl, idl_code, net etc..) however I am only to run files in folder Idl but not of sub folders.

Is there any way?
c***@ncsu.edu
2016-08-22 04:20:33 UTC
Permalink
Post by Sapna Mishra
Hi all,
Can any one tell me how to add a path in .bashrc file of a directory say Idl which contains so many sub directories such that when I do source .bashrc it is able to run all the codes and scripts inside all the different sub directories there???
Is it possible? I am doing
IDL_PATH=.:+/idl/idl70/lib:/home/cs/Idl .... The Idl folder is having many sub-directories (eg. xidl, idl_code, net etc..) however I am only to run files in folder Idl but not of sub folders.
Is there any way?
# Something like this ought to work...
# (note: specify the full, absolute path to IDL when given to `find`)
#
IDL_PATH="$(find /path/to/idl -type d -print0 |tr -s '\000' ':' |sed 's/:$//')"
export IDL_PATH

# Optionally:
#
PATH="$PATH:$IDL_PATH"
export PATH

Loading...