Public feed #599173

Something

public shellscript v1 · immutable
Raw Edit
·published 2007-07-02 01:33 UTC
rendered paste body
#!/bin/bash# print the first available bittorrent port for aria2ports=$(    netstat -4tlpn 2>&1 | tail -n+5 | awk '{print $4}' | cut -d: -f2 | sort -n)topPort=22000for port in {22000..22022}; do    if echo "$ports" | grep "$port" -; then        continue    fi    topPort=$port    breakdoneecho $topPort