Colourful grep on aix.
Linux implements a decent version of grep and highlights the search term using colour. Whilst AIX terminals can support colour (if your term session supports it) with escape codes I have not seen any way of making grep or egrep etc colourful.
On linux you simply add the parameter –color=auto such as
grep --color=auto SearchTerm {files}
Well as I couldn’t find anything on google I decided to implement something. And this is what I came up with. However the one bug I didn’t manage to resolve was If searching case insensitively the highlighting will only find the correct case. As sed does not support case insensitively this is a problem to solve. If nawk or gawk is installed, they do support it with the -i parameter.
#!/bin/ksh
#************************************************************************
# *
# Module Name : grepc.sh *
# Author : Dave Jarman +
# *
# Edit Record (most recent edit at top of list) *
# Date By CF Comments *
# --------- --- ---- --------------------------------------- *
# 5-Apr-12 DCJ i Use ampersand in sed search results as
# matched string to better handle regular
# expressions (thanks Zolo).
# 20-Sep-11 DCJ New file *
#************************************************************************
#
# Executes grep but with the escape codes to colourise the output.
#
# Known Bugs:
# If searching case insensitively the highlighting will only find the
# correct case. As sed does not support case insensitively this is a problem
# to solve. If nawk or gawk is installed, they do support it with the -i
# parameter.
#
# Other colours are available. Use the following lines.
# Blue echo "s/$QRY/\033[1;34m$QRY\033[0m/g" > $TMP/$$.sed
# Light blue echo "s/$QRY/\033[1;36m$QRY\033[0m/g" > $TMP/$$.sed
# Inverse blue echo "s/$QRY/\033[44;37m$QRY\033[0m/g" > $TMP/$$.sed
# Red echo "s/$QRY/\033[0;31m$QRY\033[0m/g" > $TMP/$$.sed
#************************************************************************
# Check for any options and save them
OPT=
while [[ $1 = [-+]?* ]]
do
OPT="$OPT $1"
shift
done
#
# Get the search string.
QRY=$1
shift
#
# Create a sed script to subsitiute for the appropriate colour.
# Show the search term in Blue
# echo "s/$QRY/\033[1;34m$QRY\033[0m/g" > $TMP/$$.sed
echo "s/$QRY/\033[1;34m&\033[0m/g" > $TMP/$$.sed
# echo /usr/bin/grep $OPT "$QRY" $* "|" sed -u -f $TMP/$$.sed
/usr/bin/grep $OPT "$QRY" $* | sed -f $TMP/$$.sed
#
# Clean up the tmp file *
rm $TMP/$$.sed
#
# Finish
exit 0
официальное казино melbet в россии https://melbetofficialsite.ru .
We are a group of volunteers and starting a new scheme in our community.
Your site offered us with valuable info to work on. You’ve done a formidable job and our whole community will be grateful to you.
mostbet com https://mostbet4118.ru/
Hi there to everү body, it’s my first pay a viѕit of this wеblog; tһis webpage consists of remarkable and in fasct fine stuff in favor of rеaders.
Hurrah, that’s what I was seeking for, what a stuff!
present here at this weblog, thanks admin of this web site.
Muy buen post, me recordó a la música urbana que está sonando fuerte.
Si te gusta este estilo, te recomiendo escuchar mi nuevo tema
“Bajo Perfil” https://bit.ly/3Ha4bEr
Un sonido único de reggaetón desde República Dominicana para el
mundo .
An intriguing discussion is definitely worth comment.
I believe that you should publish more on this subject,
it might not be a taboo subject but usually people do not speak about such issues.
To the next! Kind regards!!
мостбеи мостбеи
Hi would you mind letting me know which web host you’re utilizing?
I’ve loaded your blog in 3 different web browsers and I must say this blog loads
a lot quicker then most. Can you recommend
a good hosting provider at a honest price? Cheers, I appreciate it!
https://kibuyut.cfd/
кривой рог купить диплом о высшем образовании кривой рог купить диплом о высшем образовании .
mostbet skachat app mostbet skachat app
I have been exploring for a bit for any high quality articles or blog posts in this sort of area .
Exploring in Yahoo I at last stumbled upon this site.
Reading this information So i’m happy to express that I have a very excellent uncanny feeling
I came upon exactly what I needed. I most indisputably will make sure to do not overlook this site and provides it a glance on a continuing
basis.
купить диплом магистра дешево купить диплом магистра дешево .
When it comes to online entertainment options, few things can match spinning the reels
in an online casino. With the surge in digital gaming,
players now have access to a wide range of slot titles right from their mobile or desktop.
Whether you’re into classic 3-reel machines or video slots packed with bonus features and free spins, the
options are endless.What makes these games even more popular is how easy they are to play.
Unlike poker or blackjack, you don’t need complex strategies.
Just pick a bet amount, hit spin, and let the RNG decide your fate.
It’s all about chance, fun, and maybe landing a jackpot.
Want to know more before playing?, this article breaks it all down really well about understanding online slot odds and RTP.
It offers detailed insights into volatility, bonus rounds, and fair play.
Definitely worth a read before you spin. Read the full article here: [insert article URL].
To sum up, slot games online provide easy access to fun and potential rewards.
Make sure to manage your bankroll wisely and enjoy the ride.
Hope you hit that jackpot soon!
купить диплом магистра недорого купить диплом магистра недорого .
I enjoy, cаuse I discovered eⲭactly ᴡhat I waѕ hɑving а ⅼоⲟk for.
Youu havе ended my 4 daу lengthy hunt!
God Bless youu mɑn. Hɑve a great day. Bye
Feel free to surf tⲟ mʏ web pаge :: Jasa Like Facebook
Thankfulness to my father who shared with me about this web
site, this website is really remarkable.
mostbet texnik yordam https://mostbet4107.ru/
If yⲟu ԝish for tⲟ imcrease үour ҝnoᴡ-how
simply ҝeep visiting this weebsite and Ьe updated with tһе
most up-to-datе information posted here.
Feel fre to suff tо my h᧐mepage :: Jasa Share Facebook
Вy integrating Singaporean contexts rigһt іnto lessons, OMT mɑkes math pertinent,
cultivating love аnd inspiration foг һigh-stakes examinations.
Established in 2013 by Mr. Justin Tan, OMT Math Tuition һaѕ
helped countless trainees ace tests ⅼike PSLE, O-Levels, аnd
A-Levels wіth tested analytical strategies.
Αѕ mathematics forms tһe bedrock of abstract
tһoսght and vital problem-solving іn Singapore’s education ѕystem, professional math tuition supplies tһе
individualized assistance neеded tо turn challenges into triumphs.
Ϝor PSLE success, tuition ᥙѕes individualized guidance t᧐ weak locations, like ratio and portion problems,
avoiding typical pitfalls ԁuring the exam.
Normal mock O Level tests іn tuition setups mimic actual conditions, enabling pupils tο improve tһeir technique and reduce errors.
Tuition іn junior college math equips pupils ᴡith statistical techniques and chance versions іmportant f᧐r
analyzing data-driven questions іn A Level papers.
What distinguishes OMT iss іts proprietary program that enhances
MOE’ѕ via focus on ethical analytic іn mathematical contexts.
OMT’ѕ syѕtem is mobile-friendly ߋne, so examine on the go and see your math qualities boost ѡithout missing
out on a beat.
Maath tuition оffers enrichment рast the fundamentals,
testing talented Singapore students tο aim foг difference іn exams.
my web page – expat maths tutor singapore – ethiofarmers.com,
Everything is very open with a precise clarification of the
issues. It was definitely informative. Your website is very helpful.
Many thanks for sharing!
аппарат для узи купить аппарат для узи купить .
купить диплом образование киеве купить диплом образование киеве .
This is my first time pay a visit at here and i am in fact impressed to read everthing at single place.
mostbet parol tiklash http://mostbet4106.ru/
мостбет лайв ставки мостбет лайв ставки
где можно купить диплом о высшем образовании где можно купить диплом о высшем образовании .
Greetings! Very useful advice within this article! It is the little changes which will make the
most significant changes. Thanks for sharing!
большие уличные горшки большие уличные горшки .
When it comes to online entertainment options, few
things can match the excitement of online casino slots. Thanks to the rise of online
gambling, players now have access to hundreds of online slot games from the comfort of home.
Whether you’re into classic 3-reel machines or modern 5-reel video slots with epic
graphics, you’re spoiled for choice.Another factor contributing to
their appeal is the simplicity of gameplay.
Unlike poker or blackjack, you don’t need complex strategies.
Just pick a bet amount, hit spin, and let
the RNG decide your fate. It’s a game of luck that can be incredibly rewarding.
For those curious about how to get started, check out this helpful resource
I found about how online slot machines work.
It dives into things like payout percentages, game
mechanics, and tips for beginners. Give it a read to better
understand the slot scene. You can find the
article here: [insert article URL].
All in all, online casino slots are an accessible and thrilling way to experience gambling.
Just remember, always play within your limits and have fun. Hope you hit that jackpot soon!
как правильно делать https://remontwmsochi.ru/ – с
чего начать?
mostbet.com http://www.mostbet4117.ru
mostbey http://www.mostbet4107.ru
https://호치민찌라시.com
After looking into a few of the articles on your web page,
I truly like your way of writing a blog. I added it to my bookmark
webpage list and will be checking back in the near future.
Please check out my website as well and let me know your opinion.
Excellent post. Keep writing such kind of information on your page.
Im really impressed by your blog.
Hi there, You’ve performed an excellent job. I’ll definitely digg it and for my part recommend
to my friends. I am confident they will be benefited from this website.
You really make it seem so easy with your presentation but I find this matter to be really something that I think I would never understand.
It seems too complicated and very broad for me.
I’m looking forward for your next post, I will try to get the hang of it!
mostbet ckachat https://www.mostbet4107.ru
скачат мосбет http://mostbet4118.ru/
Greetings from Florida! I’m bored at work so I decided to browse your website on my iphone during lunch break.
I love the information you provide here and can’t wait to take a look when I get
home. I’m shocked at how quick your blog loaded on my mobile ..
I’m not even using WIFI, just 3G .. Anyways, wonderful site!
мостбет казино войти мостбет казино войти
In terms of online entertainment options, there’s hardly anything more thrilling
than spinning the reels in an online casino. Thanks to the rise of online gambling, anyone can now play hundreds of online
slot games without stepping outside. Whether you’re into classic 3-reel machines or new-age slots with progressive jackpots, the options are endless.Another
factor contributing to their appeal is the low learning curve.
Different from more strategic casino games, you can just spin and enjoy.
Just pick a bet amount, hit spin, and let the RNG decide your
fate. It’s all about chance, fun, and maybe landing a jackpot.
For those curious about how to get started, this article breaks
it all down really well about the evolution of slot machines in the digital age.
It explores how slot algorithms function and what to
expect as a new player. Highly recommended if you’re serious about playing smart.
Read the full article here: [insert article URL].
To sum up, slot games online provide easy access to
fun and potential rewards. Just remember, always play within your limits and have fun. Best of luck on the reels!
Admiring the time and energy you put into your website and detailed information you
present. It’s nice to come across a blog every once in a while that isn’t the
same outdated rehashed material. Fantastic read!
I’ve saved your site and I’m adding your
RSS feeds to my Google account.
mostbet uz ishlaydi http://mostbet4108.ru/
Do you have any video of that? I’d want to find out more details.
Hi, yes this paragraph is actually pleasant and
I have learned lot of things from it regarding blogging.
thanks.
sports bet http://www.sportbets31.ru .
I know this if off topic but I’m looking into starting my own weblog and was wondering what all is
required to get setup? I’m assuming having a blog like yours would
cost a pretty penny? I’m not very web smart so I’m not 100% sure.
Any tips or advice would be greatly appreciated.
Kudos
mostbet uz com https://mostbet4106.ru/
I am impressed with how this game, the https://sadshayarii.com/forest-arrow-slot-review/, was created, thanks to the choice of themes,
the combination of symbols, and colors of the background.