Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ["$(netstat -lpn | grep $2 | grep LISTEN)" = ""]; then
- echo "Port $2 is available!"
- else
- echo "Port $2 is not available!"
- fi
- # When i run this script in the terminal i get the debug output from netstat which i don't want!
- # How can i only get the echo messages from if condition?
Add Comment
Please, Sign In to add comment