[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Search for porterbox machines on the command line



On Fri, 13 Jun 2014, Jon Bernard wrote:

>     https://github.com/jbernard/porterbox

Ick.


I usually just spell that "ldapsearch".

  ldapsearch -h db.debian.org -x -b dc=debian,dc=org 'purpose=porterbox'

My shell history suggests I tend to throw in a couple of things to pretty up
the output (and restrict to d.o hosts, since that's all I care about):

ldapsearch -h db.debian.org -x -b dc=debian,dc=org 'purpose=porterbox'  hostname architecture -LLL | \
        egrep 'hostname|architecture|^$' | \
        awk '$1 == "architecture:" { a = $2}; $1 == "hostname:" { h = $2}; !NF && h ~ /debian.org/ {printf "%-20s %s\n", h, a; a=""; h=""} ' | \
        sort

weasel
-- 
                           |  .''`.       ** Debian **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/


Reply to: