Created
October 5, 2016 14:23
-
-
Save chazcheadle/8c231c5ac33119594177b86aee43312b to your computer and use it in GitHub Desktop.
Bash: Get final path element in working directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ex> '/home/on/the/range' will return 'range' | |
WORKDIR=${PWD##*/} | |
echo $WORKDIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment