Uniquely (sort of) color text so you can see changes

function colorify() { n=$(bc <<< "$(echo ${1}|od -An -vtu1 -w100000000|tr -d ' ') % 7"); echo -e "\e[3${n}m${1}\e[0m"; }
Colorify colors input by converting the text to a number and then performing modulo 7 on it. This resulting number is used as the color escape code. This can be used to color the results of commands with complex outputs (like "482279054165371") so if any of the digits change, there's a good chance the color will change too. I say good chance because there's only 7 unique colors here, so assuming you were watching random numbers, there would be a 6/7 chance that the color would change when the number changed. This should really only be used to help quickly identify when things change, but should not be the only thing relied upon to positively assert that an output has not changed.
Sample Output
$ colorify test
test (shows as orange)
$ colorify test2
test2 (shows as purple)

1
By: tyzbit
2020-08-06 15:17:45

What Others Think

The content of your article page is very good, I find the content quite good and helpful to me, thank you for UnlockMyTV
UnlockMyTvApk · 23 weeks ago
This is actually the kind of information I have been trying to find. Thank you for writing this information. Road Trip Planning
Cameliagobella · 22 weeks and 6 days ago
Color text is a unique and different way to write code on word. This gives a different look and also helps to distinguish between the two codes. The https://honestessaywriter.com/dissertation-help/ is an online writing service for college students.
Corban8 · 22 weeks and 4 days ago
I always get useful information through this site. I am a computer science and engineering graduate. But still, I am not good at coding. Through your site, I found coding easy. Hemp Oil So I use your help to learn to code well.
MariyaDorothy · 20 weeks and 6 days ago
family visa UK .. immigration lawyer dublin
saeed20 · 20 weeks and 2 days ago
You cannot be weak on the path of your dream. Dare to overcome the barriers to find your own way. shell shockers
JoEmily · 19 weeks and 6 days ago
You shouldn't waste time on registration and communication in the service for easy russians brides flirting if your goal is marriage. This rule is self-explanatory. However, how to choose the one that suits serious intentions in the variety of services? I advise you to read reviews on the Internet - this is usually enough. It is also very important how the service itself positions itself. For example, if its main page contains photos of hot beauties or brutal macho and promises of easy, easy communication, this is not an option for serious acquaintances.
ArdellaPolinski · 19 weeks and 6 days ago
The Get-Unique cmdlet compares each item in a sorted list to the next item, eliminates duplicates, and returns only one instance of each item. Hardwood Floor Refinishing St Louis MO
emilygoutagny · 19 weeks and 6 days ago
Found a lot of useful information, glad to join your community! jiofi local html
malkovich · 17 weeks and 2 days ago
Nice to see this post here. It is one of the best sites, and it provides so many good articles related to the programming languages and some programming codes. I think this post will be useful for programmers. Thanks for sharing the valuable information for us. In car mobile phone signal booster Australia
ryanbabraham · 13 weeks and 5 days ago
The article has outstanding image content. All information in the article is very delicate. I will keep waiting for your posts. technology + “write for us” + guest post
saichinni · 13 weeks and 3 days ago
great content! will recommend this site to my friends
looneyhans · 13 weeks and 2 days ago
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! W88
KayGasaway · 13 weeks and 1 day ago
Thank you for sharing. Thanks to this article I can learn more things. Expand your information and abilities. Now, your right place graphic design dissertation topics UK at reliable price.
arielwilson · 12 weeks and 5 days ago
essay typer How good it will be if someone will complete your challenging Economics essay on Market Structures? How much cost- effective it will be? Are you wondering where you can find such efficient and reliable essay typer?
eliza · 11 weeks and 6 days ago
The article has outstanding image content. All information in the article is very delicate. I will keep waiting for your posts. tamilrockers proxy
saichinni · 11 weeks and 4 days ago
Thanks a lot for all this and thanks for sharing please visit mine as well. [pii_pn_8a68e8c174733080624b]
saichinni · 10 weeks and 3 days ago
guitar lessons boulder I really enjoyed reading your article. I found this as an informative and interesting post, so I think it is very useful and knowledgeable.
yeoyeo · 10 weeks and 2 days ago
Thanks for sharing this great information. http://www.yycsepticservices.ca/
Breana · 8 weeks and 6 days ago
i liked this so much. great help thanks fencecompanyshreveport.com
looneyhans · 8 weeks and 5 days ago
i love this so much! dentalimplants-coloradosprings.com
Killersmile · 8 weeks and 2 days ago
awesome fence company gresham or
looneyhans · 5 weeks and 4 days ago
Thanks for sharing,It's useful for me seo services
jojokoko · 5 weeks and 2 days ago
great job! i l love it! couples counseling
idasanka · 4 weeks ago
Great job and it's very useful instruction for all people. But I want to know a deep Law Firm in India Because I always need this type of firm. Because it's very important to me.
lupillawfirm · 3 weeks and 5 days ago
https://bigpharmachem.com/ https://bigpharmachem.com/product/buy-crack-cocaine-online/ https://bigpharmachem.com/product/buy-fishscale-cocaine-online/ https://bigpharmachem.com/product/buy-mdma-crystals-online/ https://bigpharmachem.com/product/buy-crystal-meth-online/ https://bigpharmachem.com/product/buy-black-tar-heroin-online/
jessejames · 3 weeks ago
Thanks for sharing What an interesting site you have i really take a good look buy cocaine online and you can also take a good look at our blog too for more information buy crack cocaine online we also recommend you to take a good look at this site too they have good content buy mdma crystals online more of the site still want you to take a closer look too as they have really good content buy crystal meth online thanks for using your time to check on the link.BUY IBOGAINE ONLINE
jessejames · 3 weeks ago
guitar lessons long island you are soo inspiring! thanks for this!
yeoyeo · 2 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: