Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 2
    Double-quote the command substitution, or better yet don't use echo and $() like this (they mostly cancel each other out)l just run the command directly. BTW, this is a near-duplicate of: When is double-quoting necessary? (that concerns variable substitution, but the same thing applies to command substitution). Commented Jun 25, 2019 at 3:42
  • If you check the Ref: link from the whois output you will see that you can obtain the same data from arin.net in json format which you can extract and format in proper .csv with jq, instead of trying to "parse" it with $(whois | head | tail | tr). You can even bulk download the whole data Commented Jun 25, 2019 at 8:37