Give me the service running on port.
authorpatrick nsukami <ndkpatt@gmail.com>
Thu, 26 Feb 2015 23:08:21 +0000 (23:08 +0000)
committerpatrick nsukami <ndkpatt@gmail.com>
Thu, 26 Feb 2015 23:08:21 +0000 (23:08 +0000)
.bash_function

index 3cfa43d..7e04fd2 100644 (file)
@@ -2,6 +2,12 @@
 # my weird function file
 # lots of this coming from http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming
 
+my_whois_onport(){
+    # return the service on port
+    local port=$1
+    sudo lsof -i :$port
+}
+
 my_mount_set_of_partition(){
     # Mount set of partitions for recovery.
     for i in {1..12}; do