ceph/qa/find-used-ports.sh
Joao Eduardo Luis 0b30a1538a qa: add simple and dirty script to find ports being used
Seriously, having this is way better than realizing that one needs to
find an unused port each time a new test is created.

It's far from a perfect script. It's downright not elegant.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2017-11-22 16:58:34 +00:00

4 lines
120 B
Bash
Executable File

#!/bin/bash
git --no-pager grep -n '127.0.0.1:[0-9]\+' | sed -n 's/.*127.0.0.1:\([0-9]\+\).*/\1/p' | sort -n | uniq -u