#! /bin/bash # # duplicatepath - this script prints out duplicate listings that are in # your PATH environment variable with one directory per line using a # function called dupath # # here is an example of a function (must be defined before being called) # note that there is no reason to have this defined as a function here # except as an example function dupath { echo -e ${PATH//:/'\n'} | sort | uniq -d } echo echo "Here is a list of all of the directories occuring more than" echo "once in your PATH variable, normally there won't be any" echo dupath