Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bash/csh path problem

16 views
Skip to first unread message

Sapna Mishra

unread,
Mar 20, 2016, 7:32:24 AM3/20/16
to
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?

cmbu...@ncsu.edu

unread,
Aug 22, 2016, 12:20:33 AM8/22/16
to
# 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
0 new messages