#!/bin/bash FOLDER="$1/netstat" mkdir ${FOLDER} #netstat -tpnl > ${FOLDER}/listen_tcp ss -tpnl > ${FOLDER}/listen_tcp ss -upnl > ${FOLDER}/listen_udp ss -tpn > ${FOLDER}/used_tcp