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
You definitely made your point!
Howdy! I know this is kind of off topic but I was wondering which
blog platform are you using for this website? I’m getting tired of WordPress because
I’ve had issues with hackers and I’m looking at alternatives for another platform.
I would be awesome if you could point me in the
direction of a good platform.
Hello, I check your blog on a regular basis.
Your writing style is awesome, keep up the good work!
When I initially commented I clicked the “Notify me when new comments are added” checkbox
and now each time a comment is added I get four emails with the same comment.
Is there any way you can remove me from that service? Cheers!
Excellent site you have here.. It’s difficult to find high quality writing like yours these days.
I really appreciate individuals like you! Take
care!!
Enregistré comme préféré ! J’adore votre blog
web !
casino club http://casinochaser.com
Thanks to my father who told me concerning this webpage,
this weblog is in fact awesome.
What’s up to all, because I am actually keen of
reading this blog’s post to be updated daily. It contains good stuff.
Thanks for any other informative site. Where else could I
am getting that type of information written in such an ideal means?
I’ve a project that I’m just now running on, and I’ve been on the look out for such info.
Awesome post.
Medicament prescribing information. Cautions.
finasteride
Everything news about drugs. Read information now.
I have learn several good stuff here. Definitely value bookmarking for revisiting.
I wonder how so much attempt you put to create this
type of great informative website.
Attractive section of content. I just stumbled upon your weblog and in accession capital to
assert that I acquire actually enjoyed account your blog posts.
Anyway I’ll be subscribing to your augment and even I achievement you access consistently fast.
Here is my site – 虚拟号码注册whatsapp
This article presents cleasr isea in support of the neew people of blogging,
that really how tto do blogging and site-building.
Review my web blog … 카지노사이트
archive Porn
I am not certain where you are getting your information, however
good topic. I needs to spend a while finding out much more or working
out more. Thanks for great info I was looking
for this info for my mission.
I for all time emailed this weblog post page to all my friends, for the reason that if like to
read it next my friends will too.
Умение осмысливать сущности и опасностей привязанных с легализацией кредитных карт способствует людям избегать подобных атак и сохранять свои финансовые средства. Обнал (отмывание) кредитных карт — это процедура использования украденных или незаконно полученных кредитных карт для осуществления финансовых транзакций с целью сокрыть их происхождения и пресечь отслеживание.
Вот некоторые способов, которые могут содействовать в уклонении от обнала кредитных карт:
Сохранение личной информации: Будьте осторожными в связи предоставления личной информации, особенно онлайн. Избегайте предоставления номеров карт, кодов безопасности и других конфиденциальных данных на сомнительных сайтах.
Надежные пароли: Используйте безопасные и уникальные пароли для своих банковских аккаунтов и кредитных карт. Регулярно изменяйте пароли.
Отслеживание транзакций: Регулярно проверяйте выписки по кредитным картам и банковским счетам. Это поможет своевременно выявить подозрительных транзакций.
Антивирусная защита: Используйте антивирусное программное обеспечение и вносите обновления его регулярно. Это поможет защитить от вредоносные программы, которые могут быть использованы для кражи данных.
Осторожное взаимодействие в социальных сетях: Будьте осторожными в сетевых платформах, избегайте опубликования чувствительной информации, которая может быть использована для взлома вашего аккаунта.
Быстрое сообщение банку: Если вы заметили какие-либо подозрительные операции или утерю карты, сразу свяжитесь с вашим банком для блокировки карты.
Образование: Будьте внимательными к новым методам мошенничества и обучайтесь тому, как противостоять их.
Избегая легковерия и проявляя предельную осторожность, вы можете минимизировать риск стать жертвой обнала кредитных карт.
Excellent post. I was checking continuously this blog and
I’m impressed! Very useful info particularly the last part :
) I care for such info much. I was seeking this particular
information for a long time. Thank you and best of luck.
You really make it appear really easy along with your presentation but I to find this matter to be actually one thing that I
believe I would never understand. It sort of feels too complicated and very large for me.
I’m taking a look forward to your subsequent put up, I will try to get
the cling of it!
I think the admin of this web page is actually working hard in favor of his website, as here every stuff
is quality based data.
This is really interesting, You’re a very skilled blogger.
I’ve joined your feed and look forward to seeking more of your excellent post.
Also, I have shared your website in my social networks!
Greetings! Very helpful advice in this particular article!
It’s the little changes that produce the most significant changes.
Thanks for sharing!
Hi there, all the time i used to check webpage posts here early in the
dawn, as i love to find out more and more.
There’s definately a lot to know about this issue. I like all of the points you have made.
Seriously quite a lot of excellent material!
Занимает площадь в 4,2 кв. км.
на земле района в нынешней ситуации
проживали 87614 человек.
Here is my site … http://nordizm.ru/
Feel free to visit my web-site Highstakes Login
xxx
Genuinely when someone doesn’t understand then its up to other people that they
will help, so here it occurs.
Hi there! I know this is kind of off topic butt I was wondering which bblog platform are you ussing for this site?
I’mgetting tired of WordPress because I’ve had issue with hackers and I’m looking at alternatives ffor another platform.
I would be great if you could point me in the direction of a
good platform.
comprar seguidores Twitter
This article gives clear idea designed for the new users
of blogging, that in fact how to do blogging and site-building.
If some one wants to be updated with hottest
technologies then he must be pay a visit this website and be up to date all the time.
Tetapi sebab memiliki rasa daging yang enak, tingkat pertumbuhan cepat, dan dapat
berukuran besar, membuat ikan ini jadi komoditas konsumsi
oleh masyarakat Indonesia. Ikan bawal masuk ke Indonesia sekira tahun 1920, yang berasal dari Cina, Eropa, Jepang, & Taiwan. Kedua tahapan tersebut tidak setiap
kalian harus melakukannya, sebab kamu mampu menggarap pembenihan saja
serta menjual bibit ikan bawal.
Wedding venues play a pivotal role in the vibrant city of
Las Vegas, Nevada, where couples flock from around the world to tie the knot.
From extravagant ceremonies to intimate gatherings, the choice of
wedding location sets the tone for one of life’s most memorable events.
With a plethora of options ranging from outdoor garden settings to elegant banquet halls, selecting the perfect venue is essential for creating
the wedding of your dreams.
Nestled in the heart of Las Vegas, Lotus House Events offers couples a picturesque backdrop for
their special day. Founded in the same year as the city itself, Lotus House Events is
steeped in history and tradition, mirroring the
dynamic spirit of Las Vegas. With a population of 646,790 residents and over 832,367 households,
Las Vegas is a melting pot of diverse cultures and communities.
Interstate 11 traverses the city, providing convenient access to neighboring areas and attractions.
In a city known for its extreme temperatures, ranging from scorching summers to mild winters, home repairs are a constant consideration for residents.
Whether it’s air conditioning maintenance to beat the summer heat or roofing repairs
to withstand occasional rainfall, homeowners understand the importance of budgeting
for these expenses. On average, repairs typically range from a few
hundred to several thousand dollars, depending on the nature of the
work required and the contractor hired.
Exploring the vibrant tapestry of Las Vegas’s attractions, residents and visitors alike are
spoiled for choice. From the whimsical wonders of AREA15 to
the serene beauty of Aliante Nature Discovery Park, there’s something for everyone to enjoy.
Thrill-seekers can brave the Asylum-Hotel Fear
Haunted House, while art enthusiasts can marvel at the exhibits in the Arts District.
History buffs can delve into the Atomic Museum’s intriguing displays,
while families can create lasting memories at the Discovery Children’s Museum.
Choosing Lotus House Events as your wedding venue in Las Vegas ensures a seamless and unforgettable experience for you and your guests.
With a variety of indoor and outdoor spaces to accommodate
weddings of all sizes and styles, Lotus House Events offers unparalleled flexibility and customization options.
From expert wedding planning services to exquisite catering and decor, every detail
is meticulously curated to bring your vision to life.
With convenient packages and availability, Lotus House Events
takes the stress out of wedding planning, allowing you
to focus on creating cherished memories that will last a lifetime.
I’d like to thank you for the efforts you have put in writing this blog.
I am hoping to see the same high-grade content by you later on as
well. In truth, your creative writing abilities has inspired me to get my own, personal blog now
😉
Excellent way of describing, and pleasant article to take facts regarding
my presentation focus, which i am going to deliver in institution of
higher education.
Pretty instructive looking onward to visiting again.
https://www.tvsudecka.pl
I’ll immediately snatch your rss as I can not to find your email subscription link or
e-newsletter service. Do you’ve any? Kindly let me recognize in order
that I could subscribe. Thanks.
Just want to say your article is as astounding. The clearness to your post is
simply excellent and i can suppose you’re an expert
in this subject. Fine together with your permission allow me to seize your feed to stay updated with coming near near
post. Thanks 1,000,000 and please carry on the gratifying work.
Pretty component to content. I simply stumbled upon your site and in accession capital to say that
I acquire in fact loved account your blog posts.
Any way I’ll be subscribing for your feeds and even I success you get entry
to constantly rapidly.
I have fun with, lead to I discovered just what I used to be taking
a look for. You have ended my four day lengthy hunt!
God Bless you man. Have a nice day. Bye
nice one thankss
KansasState University. He was a columnist for the El Paso times, has written over
onehundred revealed articles and some books. Sprouted seeds are germinated over
a three to 5 dayspan when enzyme activity in the seed reaches a maximum
and the sprout is stillsmall. Protease: This enzyme breaks down protein found in meats, poultry, fish, nuts, eggs and cheese and could also be useful for people with food allergies or who’ve issue digesting protein. OPC are classed
with the broad group of naturally occurring antioxidant substances
found in plants known as polyphenolic flavonoids.
Nicotinic acid and inositol hexaniacinate are both useful in reducing blood cholesterol levels.
As we age, we losethe means to provide ample hydrochloric acid while 35 percent of
peopleover sixty five produce none in any respect.
A: Theoretically, it’s what our physique ismade for and it could be optimum but virtually none of us
is going to do it.Instead, there is a much simpler way to get excessive quantity of enzymes in your dietwhile nonetheless having fun with your cooked meals.
Muscle cramps might be caused by a calcium and magnesium imbalance within the physique and by a scarcity of vitamin E.
To assist stop unlock The Scrambler recurrence of cramps, take an everyday tonic of apple
cider vinegar (2 or three teaspoons to eight ounces of water) along with 1 teaspoon of honey.
I really like it whenever people come together and share thoughts.
Great blog, keep it up!
Tremendous things here. I am very satisfied to look your article.
Thank you so much and I’m taking a look forward to touch
you. Will you kindly drop me a e-mail?
Inspiring quest there. What occurred after? Take care!
Stunning quest there. What happened after? Good luck! http://serverhelp.50Webs.com/profile.php?action=get&id=26575
Stunning quest there. What happened after?
Good luck! http://serverhelp.50Webs.com/profile.php?action=get&id=26575
Hi there, its good piece of writing about media print, we all understand
media is a wonderful source of data.