• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get just the CWD in unix?  RSS feed

 
Dez Max
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm aware of PWD which gives the whole path
ex.
$ pwd
[ED]/ef1/joe12/Dez>
i just want 'Dez' , how do i do it?
regs
Dez
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basename `pwd`
With ksh on Solaris that is...
[ January 27, 2003: Message edited by: Barry Gaunt ]
 
Dez Max
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot Barry.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!