You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2014/08/14 08:06:16 UTC

svn commit: r1617885 - /qpid/dispatch/trunk/bin/find_ports.sh

Author: aconway
Date: Thu Aug 14 06:06:16 2014
New Revision: 1617885

URL: http://svn.apache.org/r1617885
Log:
NO-JIRA: Handy script find_ports.sh to find all the listening ports used by a system test.

find_ports.sh [ dir ]

Find all the listening ports mentioned in *.log files under dir.
With no dir search under the current directory.

Added:
    qpid/dispatch/trunk/bin/find_ports.sh   (with props)

Added: qpid/dispatch/trunk/bin/find_ports.sh
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/bin/find_ports.sh?rev=1617885&view=auto
==============================================================================
--- qpid/dispatch/trunk/bin/find_ports.sh (added)
+++ qpid/dispatch/trunk/bin/find_ports.sh Thu Aug 14 06:06:16 2014
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Usage: $0 [ dir ]
+# Find all the listening ports mentioned in *.log files under dir.
+# With no dir search under current directory.
+
+find "$@" -name '*.log' | xargs gawk 'match($0, /Listening on .* ([0-9]+)/, m) { print m[1] } match($0, /Configured Listener: .*:([0-9]+)/, m) { print m[1] }'
+

Propchange: qpid/dispatch/trunk/bin/find_ports.sh
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org