starkk92 starkk92 - 3 months ago 13
Linux Question

How to set path for local bin file in cshrc

I use

csh
and I have made a binary file
rlwrap
and the path is
/home/srinadel/bin/rlwrap
locally

[srinadel@slc ~/bin]$ ls -ltr
total 259
-rwxr-xr-x+ 1 srinadel dba 221806 Oct 21 03:48 rlwrap


Now I want to
set the path
for it in my
~/.cshrc
file.
I have added this line in my
~/.cshrc
file.

setenv PATH {$PATH}:/home/srinadel/bin/rlwrap


and I have
added alias in my /etc/csh.cshrc file
as

alias sqlplus 'rlwrap sqlplus'


And in the new terminal,I have seen the alias where I have found
sqlplus rlwrap sqlplus
.
I have tried to run sqlplus going all the way to my folder where
rlwrap
is located and run the
sqlplus
as
rlwrap sqlplus
and it worked fine.

Now I have tried to run
sqlplus
using alias,It didn't work.It says
command:rlwrap is not found
;

Now I have to some other folder and tried to run using
rlwrap sqlplus
just to see if the alias is at faulty,Even this didn't work.The same error was thrown-
command:rlwrap is not found
.

So I think there should be a problem with the path of the rlwrap.So I have run
echo $PATH
.
The output is as follows:

/ade/srinadel_collation_ts/oss/utl:/ade/srinadel_collation_ts/oss/bin:/opt/microfocus/cobol/bin:/usr/local/redhat/packages/perl_5.6.1/bin:/ade/srinadel_collation_ts/plsql/bin:/ ade/srinadel_collation_ts/plsql/utl:/ade/srinadel_collation_ts/plsql/utl/scripts:.:/ade/srinadel_collation_ts/buildtools/bin:/ade/b/2332830812/oracle/bin:/ade/b/2332830812/oracle/rdbms/utl:/ade/b/2332830812/oracle/rdbms/utl:/ade/srinadel_collation_ts/utl:/ade/srinadel_collation_ts/nlsrtl3/bin:/usr/sbin:/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/ generic/bin:/usr/local/bin:/etc:/usr/bin:/usr/ccs/bin:/usr/local/nde/bin:/usr/ucb:/usr/X11R6/bin:/usr/local/ade/bin:/ade/srinadel_collation_ts/odbctests/odbc_ptest/bin:/ade/ srinadel_collation_ts/rdbms_topaz:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/ usr/X11R6/bin:/usr/local/ade/bin:/home/srinadel/bin/rlwrap:/home/srinadel/bin/rlwrap:/ade/srinadel_collation_ts/utl:/ade/srinadel_collation_ts/reliaty/utl:/ade/srinadel_collation_ts/ant/bin:/home/srinadel/bin/rlwrap


Where the path to the
tlwrap
is shown correctly.

What might be the problem..Thanks.

Answer

The PATH variable is a list of directories to be searched, you need

setenv PATH {$PATH}:/home/srinadel/bin

IHTH

Comments