#!/bin/bash
# this script takes nmap scan result (ports) and put them in one line with a comma seperator
# i.e) 22,80,459,2222
#
echo "Please enter the file name you want to use:"
read file_name
combine_ports() {
cat $file_name | awk '{print $1}'| sed 's/\/tcp//g' | sed 's/,$//g'
}
combine_ports