A simple shell script to determine if a port is in use

./lpiu_check 80

or

./lpiu_check

You can move it to /usr/local/bin/ to you make it always available irrespective of your current working directory