This 'one liner' can do that for you:
for THIS_PATH in `echo $PATH | sed 's/:/ /g'`; do [[ ! -d $THIS_PATH ]] && echo "WARNING $THIS_PATH does not exist."; done
The scripted form would look like this:
Code:
#!/bin/bash
for THIS_PATH in `echo $PATH | sed 's/:/ /g'`
do
[[ ! -d $THIS_PATH ]] && echo "WARNING $THIS_PATH does not exist."
done
Hope this helps.