만일 빼고 싶은 패스가 /home/user/bin이라면, 다음과 같이 하면 된다.

PATH=$(echo $PATH | sed -e 's;:\?/home/user/bin;;' -e 's;/home/user/bin:\?;;')
Posted by code cat