
Show HN: xo – utility that takes input from stdin and formats the regexp matches - ezekg
https://github.com/ezekg/xo
======
seletskiy
And how it's better, than sed/awk?

xo: function shh() { ssh $(cat servers.yml | xo "/. _?($1):\s_
server:\s+([^:\n]+):?(\d+)?. _?user:\s+([^\n]+)._ /\$4@\$2 -p \$3?:22/mis") }

sed: function shh() { ssh $(cat servers.yml | sed -nre'/'$1':/{n;N;s/. _:
([^:]+)(:(._ ))?\n. _: (._ )/\4@\1 -p\3/;s/-p$//;p}') }

