Whois queries with color output Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionMake terminal text color different when in ssh sessionAdd in `whois` serversControl source address for whois queriesWHOIS over SSH via specific portPreserving color output with cutGit pager is less, but what is causing the output coloring?How to create a Kate highlight syntax to CSV filesHow do I look up NIC handles for whois?Obtain WHOIS data field(s) without parsing?How do you use proxy with the whois command?
Determine whether f is a function, an injection, a surjection
Can a zero nonce be safely used with AES-GCM if the key is random and never used again?
Is it possible to ask for a hotel room without minibar/extra services?
Make it rain characters
Why is "Captain Marvel" translated as male in Portugal?
Two different pronunciation of "понял"
How can I protect witches in combat who wear limited clothing?
Who can trigger ship-wide alerts in Star Trek?
Can smartphones with the same camera sensor have different image quality?
I'm having difficulty getting my players to do stuff in a sandbox campaign
Is there folklore associating late breastfeeding with low intelligence and/or gullibility?
If I can make up priors, why can't I make up posteriors?
What to do with post with dry rot?
Array/tabular for long multiplication
Stop battery usage [Ubuntu 18]
What do you call a plan that's an alternative plan in case your initial plan fails?
Why does this iterative way of solving of equation work?
I'm thinking of a number
Can a 1st-level character have an ability score above 18?
Why does tar appear to skip file contents when output file is /dev/null?
Single author papers against my advisor's will?
What would be Julian Assange's expected punishment, on the current English criminal law?
Estimated State payment too big --> money back; + 2018 Tax Reform
Am I ethically obligated to go into work on an off day if the reason is sudden?
Whois queries with color output
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionMake terminal text color different when in ssh sessionAdd in `whois` serversControl source address for whois queriesWHOIS over SSH via specific portPreserving color output with cutGit pager is less, but what is causing the output coloring?How to create a Kate highlight syntax to CSV filesHow do I look up NIC handles for whois?Obtain WHOIS data field(s) without parsing?How do you use proxy with the whois command?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Is there an easy way to make whois queries from the terminal have syntax coloring in the output so it would be easier to read?
Something basic like coloring NOT FOUND in red, and field names and dates in different colors would already be useful. It doesn't matter if the coloring is not 100% accurate.
colors syntax-highlighting whois
add a comment |
Is there an easy way to make whois queries from the terminal have syntax coloring in the output so it would be easier to read?
Something basic like coloring NOT FOUND in red, and field names and dates in different colors would already be useful. It doesn't matter if the coloring is not 100% accurate.
colors syntax-highlighting whois
add a comment |
Is there an easy way to make whois queries from the terminal have syntax coloring in the output so it would be easier to read?
Something basic like coloring NOT FOUND in red, and field names and dates in different colors would already be useful. It doesn't matter if the coloring is not 100% accurate.
colors syntax-highlighting whois
Is there an easy way to make whois queries from the terminal have syntax coloring in the output so it would be easier to read?
Something basic like coloring NOT FOUND in red, and field names and dates in different colors would already be useful. It doesn't matter if the coloring is not 100% accurate.
colors syntax-highlighting whois
colors syntax-highlighting whois
edited 23 hours ago
Rui F Ribeiro
42.1k1483142
42.1k1483142
asked Apr 10 at 19:49
LassiLassi
28318
28318
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The program, grc, is "the frontend for generic colouriser grcat." The project exists at GitHub, but it might be installed from a repository, if your O/S has packaged the software. Many commands come preconfigured, and it can be customized to colorize any command.
A portion of output is shown below for the command, whois stackexchansssssssge.com.

To incorporate the caveat noted in the comments, please note that one can abbreviate the command, grc whois <arg>, with the command, whois <arg>, by sourcing the appropriate script that comes with the software. This script (one of grc.zsh, grc.bashrc, or grc.fish, according to the corresponding shell in use) establishes aliases for the configured commands that prepend each configured command with grc --colour=auto.
The software has preconfigured color for the following commands.
- cc
- configure
- cvs
- df
- diff
- dig
- gcc
- gmake
- ifconfig
- last
- ldap
- ls
- make
- mount
- mtr
- netstat
- ping
- ping6
- ps
- traceroute
- traceroute6
- wdiff
- whois
- iwconfig
Accomplish the Goal Without Color
In Linux, at least, note also that the exit code from whois should be 0 when a domain name was found and 1 when a domain name was not found.
whois stackexchange.com
echo $?
This produces an exit code of 0 - found.
whois stackexchansssssssge.com
echo $?
This produces an exit code of 1 - not found.
Or, to deduce the same with no output from whois, try as follows, using ; to assure output of the exit code.
whois stackexchange.com >&- ; echo $?
whois stackexchansssssssge.com >&- ; echo $?
grc whoisis just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, butgrcdoes the job just fine.
– Lassi
Apr 10 at 21:29
1
Ah! Yes...grc whois. In order to type merelywhoisfor the same result, one could source the right file for the shell in use, e.g:grc.zsh,grc.bashrc,grc.fish. This action establishes the aliases to prependgrc --colour=autoto commands.
– Christopher
Apr 10 at 21:36
Yes, but evengrc whoisis already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)
– Lassi
Apr 10 at 21:40
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511747%2fwhois-queries-with-color-output%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The program, grc, is "the frontend for generic colouriser grcat." The project exists at GitHub, but it might be installed from a repository, if your O/S has packaged the software. Many commands come preconfigured, and it can be customized to colorize any command.
A portion of output is shown below for the command, whois stackexchansssssssge.com.

To incorporate the caveat noted in the comments, please note that one can abbreviate the command, grc whois <arg>, with the command, whois <arg>, by sourcing the appropriate script that comes with the software. This script (one of grc.zsh, grc.bashrc, or grc.fish, according to the corresponding shell in use) establishes aliases for the configured commands that prepend each configured command with grc --colour=auto.
The software has preconfigured color for the following commands.
- cc
- configure
- cvs
- df
- diff
- dig
- gcc
- gmake
- ifconfig
- last
- ldap
- ls
- make
- mount
- mtr
- netstat
- ping
- ping6
- ps
- traceroute
- traceroute6
- wdiff
- whois
- iwconfig
Accomplish the Goal Without Color
In Linux, at least, note also that the exit code from whois should be 0 when a domain name was found and 1 when a domain name was not found.
whois stackexchange.com
echo $?
This produces an exit code of 0 - found.
whois stackexchansssssssge.com
echo $?
This produces an exit code of 1 - not found.
Or, to deduce the same with no output from whois, try as follows, using ; to assure output of the exit code.
whois stackexchange.com >&- ; echo $?
whois stackexchansssssssge.com >&- ; echo $?
grc whoisis just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, butgrcdoes the job just fine.
– Lassi
Apr 10 at 21:29
1
Ah! Yes...grc whois. In order to type merelywhoisfor the same result, one could source the right file for the shell in use, e.g:grc.zsh,grc.bashrc,grc.fish. This action establishes the aliases to prependgrc --colour=autoto commands.
– Christopher
Apr 10 at 21:36
Yes, but evengrc whoisis already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)
– Lassi
Apr 10 at 21:40
add a comment |
The program, grc, is "the frontend for generic colouriser grcat." The project exists at GitHub, but it might be installed from a repository, if your O/S has packaged the software. Many commands come preconfigured, and it can be customized to colorize any command.
A portion of output is shown below for the command, whois stackexchansssssssge.com.

To incorporate the caveat noted in the comments, please note that one can abbreviate the command, grc whois <arg>, with the command, whois <arg>, by sourcing the appropriate script that comes with the software. This script (one of grc.zsh, grc.bashrc, or grc.fish, according to the corresponding shell in use) establishes aliases for the configured commands that prepend each configured command with grc --colour=auto.
The software has preconfigured color for the following commands.
- cc
- configure
- cvs
- df
- diff
- dig
- gcc
- gmake
- ifconfig
- last
- ldap
- ls
- make
- mount
- mtr
- netstat
- ping
- ping6
- ps
- traceroute
- traceroute6
- wdiff
- whois
- iwconfig
Accomplish the Goal Without Color
In Linux, at least, note also that the exit code from whois should be 0 when a domain name was found and 1 when a domain name was not found.
whois stackexchange.com
echo $?
This produces an exit code of 0 - found.
whois stackexchansssssssge.com
echo $?
This produces an exit code of 1 - not found.
Or, to deduce the same with no output from whois, try as follows, using ; to assure output of the exit code.
whois stackexchange.com >&- ; echo $?
whois stackexchansssssssge.com >&- ; echo $?
grc whoisis just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, butgrcdoes the job just fine.
– Lassi
Apr 10 at 21:29
1
Ah! Yes...grc whois. In order to type merelywhoisfor the same result, one could source the right file for the shell in use, e.g:grc.zsh,grc.bashrc,grc.fish. This action establishes the aliases to prependgrc --colour=autoto commands.
– Christopher
Apr 10 at 21:36
Yes, but evengrc whoisis already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)
– Lassi
Apr 10 at 21:40
add a comment |
The program, grc, is "the frontend for generic colouriser grcat." The project exists at GitHub, but it might be installed from a repository, if your O/S has packaged the software. Many commands come preconfigured, and it can be customized to colorize any command.
A portion of output is shown below for the command, whois stackexchansssssssge.com.

To incorporate the caveat noted in the comments, please note that one can abbreviate the command, grc whois <arg>, with the command, whois <arg>, by sourcing the appropriate script that comes with the software. This script (one of grc.zsh, grc.bashrc, or grc.fish, according to the corresponding shell in use) establishes aliases for the configured commands that prepend each configured command with grc --colour=auto.
The software has preconfigured color for the following commands.
- cc
- configure
- cvs
- df
- diff
- dig
- gcc
- gmake
- ifconfig
- last
- ldap
- ls
- make
- mount
- mtr
- netstat
- ping
- ping6
- ps
- traceroute
- traceroute6
- wdiff
- whois
- iwconfig
Accomplish the Goal Without Color
In Linux, at least, note also that the exit code from whois should be 0 when a domain name was found and 1 when a domain name was not found.
whois stackexchange.com
echo $?
This produces an exit code of 0 - found.
whois stackexchansssssssge.com
echo $?
This produces an exit code of 1 - not found.
Or, to deduce the same with no output from whois, try as follows, using ; to assure output of the exit code.
whois stackexchange.com >&- ; echo $?
whois stackexchansssssssge.com >&- ; echo $?
The program, grc, is "the frontend for generic colouriser grcat." The project exists at GitHub, but it might be installed from a repository, if your O/S has packaged the software. Many commands come preconfigured, and it can be customized to colorize any command.
A portion of output is shown below for the command, whois stackexchansssssssge.com.

To incorporate the caveat noted in the comments, please note that one can abbreviate the command, grc whois <arg>, with the command, whois <arg>, by sourcing the appropriate script that comes with the software. This script (one of grc.zsh, grc.bashrc, or grc.fish, according to the corresponding shell in use) establishes aliases for the configured commands that prepend each configured command with grc --colour=auto.
The software has preconfigured color for the following commands.
- cc
- configure
- cvs
- df
- diff
- dig
- gcc
- gmake
- ifconfig
- last
- ldap
- ls
- make
- mount
- mtr
- netstat
- ping
- ping6
- ps
- traceroute
- traceroute6
- wdiff
- whois
- iwconfig
Accomplish the Goal Without Color
In Linux, at least, note also that the exit code from whois should be 0 when a domain name was found and 1 when a domain name was not found.
whois stackexchange.com
echo $?
This produces an exit code of 0 - found.
whois stackexchansssssssge.com
echo $?
This produces an exit code of 1 - not found.
Or, to deduce the same with no output from whois, try as follows, using ; to assure output of the exit code.
whois stackexchange.com >&- ; echo $?
whois stackexchansssssssge.com >&- ; echo $?
edited Apr 10 at 22:21
answered Apr 10 at 20:27
ChristopherChristopher
10.9k33349
10.9k33349
grc whoisis just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, butgrcdoes the job just fine.
– Lassi
Apr 10 at 21:29
1
Ah! Yes...grc whois. In order to type merelywhoisfor the same result, one could source the right file for the shell in use, e.g:grc.zsh,grc.bashrc,grc.fish. This action establishes the aliases to prependgrc --colour=autoto commands.
– Christopher
Apr 10 at 21:36
Yes, but evengrc whoisis already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)
– Lassi
Apr 10 at 21:40
add a comment |
grc whoisis just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, butgrcdoes the job just fine.
– Lassi
Apr 10 at 21:29
1
Ah! Yes...grc whois. In order to type merelywhoisfor the same result, one could source the right file for the shell in use, e.g:grc.zsh,grc.bashrc,grc.fish. This action establishes the aliases to prependgrc --colour=autoto commands.
– Christopher
Apr 10 at 21:36
Yes, but evengrc whoisis already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)
– Lassi
Apr 10 at 21:40
grc whois is just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, but grc does the job just fine.– Lassi
Apr 10 at 21:29
grc whois is just the kind of thing I hoped for, that's awesome! I just realized that it would be easy to write Emacs/Vim syntax rules too, but grc does the job just fine.– Lassi
Apr 10 at 21:29
1
1
Ah! Yes...
grc whois. In order to type merely whois for the same result, one could source the right file for the shell in use, e.g: grc.zsh, grc.bashrc, grc.fish. This action establishes the aliases to prepend grc --colour=auto to commands.– Christopher
Apr 10 at 21:36
Ah! Yes...
grc whois. In order to type merely whois for the same result, one could source the right file for the shell in use, e.g: grc.zsh, grc.bashrc, grc.fish. This action establishes the aliases to prepend grc --colour=auto to commands.– Christopher
Apr 10 at 21:36
Yes, but even
grc whois is already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)– Lassi
Apr 10 at 21:40
Yes, but even
grc whois is already extremely easy. I almost miss the good old scrolling through a grey wall of legal mumbo jumbo and miscellaneous names and numbers :)– Lassi
Apr 10 at 21:40
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511747%2fwhois-queries-with-color-output%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown