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
mostbet uz apk skachat mostbet uz apk skachat
Открытие аккаунтов в казино Пин Ап разрешено только
совершеннолетним посетителям Выполнить регистрационную процедуру в данном онлайн клубе
смогут даже неопытные новички.
Asking questions are really pleasant thing if you are not understanding anything completely, but this paragraph offers nice understanding yet.
I’m not sure where you are getting your info, but great
topic. I needs to spend some time learning more or understanding
more. Thanks for magnificent information I was looking for this information for my mission.
Excellent blog you have here.. It’s difficult to find quality
writing like yours these days. I really appreciate individuals like you!
Take care!!
When someone writes an piece of writing he/she maintains the plan of
a user in his/her mind that how a user can understand it. Thus that’s why this piece of writing is perfect.
Thanks!
Hmm is anyone else encountering problems with the pictures
on this blog loading? I’m trying to find out if its a
problem on my end or if it’s the blog. Any responses would be greatly appreciated.
This is a topic that’s close to my heart… Thank you!
Exactly where are your contact details though?
강남쩜오는 고급 룸살롱 문화의 한 갈래로, 강남에서 2000년대 초반에 등장한 하이엔드 유흥 업소를 지칭합니다.
일반적인 강남 가라오케나 퍼블릭 술집과 달리
De ceva vreme testez jocul theweddingresale.com și pot spune că reușește să
combine ușurința cu suspansul foarte bine.
Nu ai nevoie de strategii complicate, doar alegi un punct de start și lansezi bila,
iar nu știi niciodată unde ajunge bila. Tocmai această lipsă de complicații îl face plăcut
pentru toată lumea. Nu te plictisești niciodată, iar grafica
contribuie mult la senzația generală. Când vine vorba de plinko romania
pareri, observ că se repetă o temă clară – o experiență care se repetă fără să
plictisească. Poți juca 10 minute sau o oră, dar mereu ai parte de fiorul ăla.
Personal, cred că plinko online a devenit un fenomen pe bună dreptate și chiar merită să fie încercat măcar o
dată, mai ales dacă te atrag jocurile care surprind la fiecare pas.
Lumina Solar Delaware is recognized as the top solar panel installation company operating
in the Yorklyn, DE area. Yorklyn, situated near coordinates 39.7443° N
latitude and 75.6594° W longitude, is a community with a population of about 3,500 residents.
This area benefits greatly from Lumina Solar Delaware’s knowledge due to its proximity
to natural and historical landmarks such as the
Red Clay Creek and Auburn Heights Preserve, which underscore the community’s commitment to protecting
natural resources. The region enjoys an average of 4.5 peak sun hours per day, making it an optimal location for solar energy solutions.
Lumina Solar Delaware leverages this solar potential
to provide high-quality and cost-effective installations tailored to
Yorklyn’s residential and commercial properties.
The demographic profile of Yorklyn includes a mix of homeowners and environmentally conscious
businesses, both of which Lumina Solar Delaware serves by offering personalized solar panel systems that lower energy costs and carbon footprints.
Their knowledge of local regulations and incentives, such as Delaware’s
Renewable Energy Portfolio Standard, ensures clients in Yorklyn obtain maximum benefits from their solar
investments.
You’ve explained it perfectly. 👉 Watch Live Tv online in HD. Stream breaking news, sports, and top shows anytime, anywhere with fast and reliable live streaming.
hey tһere andd thank you for yoᥙr informattion – Ι have certainly picked
up anythіng neѡ fгom right heге. I dіd however expertise а few
technical points uѕing tһis website, since I expwrienced to reload tһe web site ɑ ⅼot ᧐f
tіmes previkous to I ϲould get it to load correctly.
I hɑd been wondering iff ʏօur web host іs OҚ? Not that
I’m complaining, but low loading instances tіmes will sometimes
affect уour placement in google аnd can damage your high qualkty score іf ads and marketing ѡith Adwords.
Anyᴡay I’m adding tһis RSS to my email and ϲould loоk outt fⲟr much moгe of уour respective exciting
content.Ensure tһat youu update tһіs agaіn very sοon.
Hеre is my web site: Beli Follower Pinterest
Hmm is anyone else having problems with the images on this blog loading?
I’m trying to find out if its a problem on my end
or if it’s the blog. Any responses would be greatly appreciated.
Way cool! Some extremely valid points! I appreciate you writing this post and the rest of the website is also
very good.
Awesome article.
Your style is really unique compared to other folks I’ve read stuff
from. Many thanks for posting when you’ve got the opportunity, Guess I’ll just book mark this site.
My spouse and I stumbled over here different website and thought I should check things out.
I like what I see so i am just following you. Look forward to exploring your web page again.
мостбет узкард вывод мостбет узкард вывод
I don’t even know how I ended up here, but I thought this post was good.
I don’t know who you are but certainly you’re going to a famous blogger
if you are not already 😉 Cheers!
At this time I am going to do my breakfast, when having my breakfast coming yet again to read more
news.
Hi, its good article about media print, we all understand media is a
fantastic source of information.
전국 마사지샵 채용 정보와 구직자를 연결하는 마사지 구인구직
플랫폼입니다. 마사지구인부터 마사지알바,
스웨디시구인까지, 신뢰할 수 있는 최신 채용 정보를 제공
pirinç korkuluk montajı
Hi friends, nice piece of writing and pleasant arguments commented here, I am truly enjoying by these.
Thank you for sharing your thoughts. I truly appreciate your efforts and I am waiting
for your further post thank you once again.
Hey I know this is off topic but I was wondering if you knew of any widgets I
could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and
was hoping maybe you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading your blog and
I look forward to your new updates.
Marvelous, what a webpage it is! This weblog gives useful
data to us, keep it up.
I am extremely inspired along with your writing talents and also with the
format for your blog. Is that this a paid subject or did you customize it your self?
Anyway keep up the nice quality writing, it is rare to see a great blog like this one
today..
Unquestionably believe that which you said. Your favorite reason seemed to be on the web the simplest thing
to be aware of. I say to you, I certainly get irked while people think
about worries that they plainly do not know about.
You managed to hit the nail upon the top and also defined out the whole thing
without having side-effects , people could take a signal.
Will likely be back to get more. Thanks
mostbet бетгеймс https://mostbet4117.ru/
You actually make it seem so easy with your presentation but I
find this matter to be actually something that I think I would never understand.
It seems too complex and extremely broad for me. I am looking
forward for your next post, I’ll try to get the hang of
it!
mosbet mostbet4106.ru
Superb website you have here but I was wanting to know if you
knew of any discussion boards that cover the same topics
discussed in this article? I’d really like to be
a part of group where I can get advice from other experienced individuals that share the
same interest. If you have any recommendations, please let me know.
Appreciate it!
Pretty! This has been an incredibly wonderful post.
Many thanks for supplying this information.
Thanks for the article https://www.example3.com/domain/prom.ua .
Thanks for the article https://xiglute.com/forums/topic/75114/the-most-beautifully-designed-online-slots/view/post_id/658150 .
Talking about ways to enjoy your free time on the internet,
few things can match playing slot games at a digital casino.
With the surge in digital gaming, users can now
enjoy countless of online slot games right from their
mobile or desktop. If you love retro-style fruit machines
or video slots packed with bonus features and free spins, there’s something for everyone.One reason why slots dominate
online casinos is the low learning curve. Unlike poker or blackjack, you don’t
need complex strategies. Choose your paylines, spin, and see if luck’s on your side.
It’s a game of luck that can be incredibly rewarding.
If you’re looking to explore this world, check out this
helpful resource I found about how online slot machines work.
It offers detailed insights into volatility, bonus rounds, and fair play.
Give it a read to better understand the slot scene.
You can find the article here: [insert article URL].
To sum up, slot games online provide easy access to fun and potential rewards.
Whether you’re in it for fun or hoping for a big payout,
just remember to gamble responsibly. Best of luck on the reels!
мостбет скачать приложение на андроид бесплатно mostbet4117.ru
mostbet uz depozit http://mostbet4108.ru/
Против 28 в июле прошлого года, https://amanor.ru/ когда нового завода еще не было.
А беларуские магазины – продавать беларуское.
I want to to thank you for this fantastic read!! I absolutely
loved every little bit of it. I have you bookmarked to check out new stuff you post…
In terms of online entertainment options, few things can match spinning the
reels in an online casino. Thanks to the rise of online gambling, users can now
enjoy countless of slot titles from the comfort of home.
Whether you’re into classic 3-reel machines or video slots
packed with bonus features and free spins, you’re spoiled
for choice.Another factor contributing to their appeal is the low
learning curve. Unlike table games like baccarat or roulette, you can just
spin and enjoy. Choose your paylines, spin, and see if luck’s on your side.
It’s pure luck-based entertainment, with the chance to win big.
If you’re looking to explore this world, this article breaks it all down really well about
the evolution of slot machines in the digital age.
It dives into things like payout percentages, game mechanics, and tips for
beginners. Definitely worth a read before you spin. You can find the article here: [insert article URL].
All in all, online casino slots are an accessible and thrilling way to experience
gambling. Make sure to manage your bankroll wisely
and enjoy the ride. Good luck and happy spinning!
pirinç korkuluk aparatı
Hi there, I enjoy reading through your article post. I like to write
a little comment to support you.
hey there and thank you for your info – I’ve definitely picked up anything new from right here.
I did however expertise a few technical points using this site, as
I experienced to reload the web site lots of times previous to I could get it to load properly.
I had been wondering if your web host is OK?
Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your quality score
if ads and marketing with Adwords. Anyway I am
adding this RSS to my email and can look out for a lot more of your respective exciting content.
Ensure that you update this again soon.
In terms of finding entertainment online, nothing really compares
to playing slot games at a digital casino. With the surge
in digital gaming, users can now enjoy countless of slot
titles from the comfort of home. For fans of traditional
slots or video slots packed with bonus features and free spins, there’s something for everyone.What makes these
games even more popular 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.
If you’re looking to explore this world, I recently came across a really
informative article about the evolution of slot machines in the digital age.
It dives into things like payout percentages, game mechanics, and tips for beginners.
Highly recommended if you’re serious about playing smart.
Read the full article here: [insert article URL].
Overall, slots bring together excitement, simplicity, and
the chance to win big. Make sure to manage your bankroll wisely and enjoy
the ride. Hope you hit that jackpot soon!
Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is valuable and everything. However think about if
you added some great images or video clips to give your posts more, “pop”!
Your content is excellent but with images and video clips, this site could certainly be one of the best in its niche.
Great blog!
Great article, totally what I wanted to find.
Greetings, I do believe your site could possibly be having web browser
compatibility problems. Whenever I look at your site in Safari, it looks fine however, if opening in I.E., it’s got some overlapping issues.
I just wanted to provide you with a quick heads up! Besides that, fantastic site!
дипломы бывшего ссср купить дипломы бывшего ссср купить .
Hi there to every , for the reason that I am in fact eager
of reading this blog’s post to be updated on a regular basis.
It contains fastidious data.