manipulating the path variable in unix code example Example: get first directory in path environment variable echo ${PATH%%:*}