Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PWD command minus the current dir? 1

Status
Not open for further replies.

bgreen

Programmer
Feb 20, 2003
185
CA
Hi all,

I want the ability to list the current path minus the current dir. Is there a way? I want this the ability to use this in several different directories.

pwd gives you the path to the current dir:
ex.
pwd
/u6/oracle/prodappl/test_int/1.0.0/bin

I want
/u6/oracle/prodappl/test_int/1.0.0

Help please.
 
Try dirname `pwd`

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top