Netflix / denominator

Portably control DNS clouds using java or bash
Apache License 2.0
580 stars 110 forks source link

Column collisions in `record list` output #267

Closed quinncomendant closed 9 years ago

quinncomendant commented 10 years ago

Notice how column 1 and 2 run together at the "A" after longer hostnames…

denominator -q -n clouddns-strangecode record -z strangecode.com list | sort -k2

[…]
weddingamandaparktaylorcom.alias.strangecode.com  A      300  67.192.236.115
thelivinglightfoundationorg.alias.strangecode.com A      300  67.192.236.115
contemplativeobservatorycom.alias.strangecode.com A      300  67.192.236.117
astillbornstarproductionscom.alias.strangecode.comA      300  67.192.236.115
betacreativeimagingcentercom.alias.strangecode.comA      300  67.192.236.115
potentialsofconsciousnessorg.alias.strangecode.comA      300  67.192.236.117
devidentity-internationalcom.alias.strangecode.comA      300  72.32.210.21
skylineplantbiologyprojectorg.alias.strangecode.comA     300  67.192.236.115
premiumdesignspatternsandtrimcom.alias.strangecode.comA  300  67.192.236.117

This could be problematic if the output is ever parsed by a non-human. Just add a space character after each printf %s position (guessing—no clue if you're using printf or not).

BTW, the above output was piped through column -t to compress the output for web view. Compressing column whitespace wouldn't be unpleasant to do inside denominator anyways.

codefromthecrypt commented 9 years ago

crazy latency, but I plan to spend a bit of time in denominator. ping back if you'd still like this addressed!

quinncomendant commented 9 years ago

This one very easy to fix, and somewhat important.

Q

On Tue, 27 Jan 2015 22:12:11 -0800, Adrian Cole wrote:

crazy latency, but I plan to spend a bit of time in denominator. ping back if you'd still like this addressed! — Reply to this email directly or view it on GitHub.