Operating System - HP-UX
1834449 Members
2225 Online
110067 Solutions
New Discussion

why are there two slashes?

 
SOLVED
Go to solution
Dave Chamberlin
Trusted Contributor

why are there two slashes?

Not important but I was curious. When I do:
which jetadmin
I get:
/opt/hpnp//bin/jetadmin

Why are there two slashes here? A pwd from /opt/hpnp/bin shows only one slash.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: why are there two slashes?

Check your path variable via echo $PATH; it appears that an extra slash was inserted in the /opt/hpnp portion. This is typically set in /etc/PATH.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: why are there two slashes?

Check your $PATH variable. It should have /opt/hpnp//bin and it is the reason. It is set through /etc/PATH file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Deepak Extross
Honored Contributor

Re: why are there two slashes?

A typical case where this could happen is if you have something like this in your .profile:
HP_BASE=opt/hpnp/
BIN_DIR=$HP_BASE/bin

In this case, echo $BIN_DIR will give you opt/hpnp//bin/

It's quite harmless, though.
cd opt/hpnp/bin
is effectively the same as
cd opt/hpnp//bin
or even
cd opt/hpnp///bin