PWD question : Current dir not full path
Hey Gang,
Dumb question I know.. But i can't nut it out. pwd gives me /home/work/test /usr/files/386 I only want to know what dir i'm in. So answer is test or 386 I know I need to pipe this through SED perhaps but can't work it out... Ideas? Cheers, M. |
Code:
pwd | awk -F/ '{print $NF}' |
Also found
pwd | sed 's/.*\///' works too. Cheers, M. |
All times are GMT -5. The time now is 07:05 AM. |