
#  awk script to take in $PATH, spit out one at a time

{
    pathstr = $0
    i = 1
    i = index(pathstr, ":")
    while (i > 0) {
       elem = substr(pathstr, 1, i-1)
       if (pelem[elem] != 1) {
          print "ccheck $1 " elem 
          pelem[elem] = 1
       }
       pathstr = substr(pathstr, i+1)
       i = index(pathstr, ":")
    }
    if (pelem[pathstr] != 1) {
       print "ccheck $1 " pathstr
    }
}

