get first path in path env variable code example Example: get first path in path env variable echo ${PATH%%:*}