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
http://catering123.s3-website.eu-north-1.amazonaws.com/research/catering123-(567).html
You might, of course, choose a maxi costume for
your special occasion.
https://filedn.eu/lXvDNJGJo3S0aUrNKUTnNkb/accounting12/
The neckline of the dress will have an result on everything from the
form of the gown to which areas of your physique are highlighted.
http://accounting0002.s3-website.us-east-2.amazonaws.com/research/accounting0002-(15).html
For the mom whose type is glossy and minimal, go for
a gown with an architectural silhouette in her favorite shade.
https://accounting5.research.au-syd1.upcloudobjects.com/research/accounting5-(410).html
Make positive you’re both wearing the identical formality of costume as properly.
https://Pc24horas.cl/index.php/component/k2/item/2-type-makes-a-difference-an-exploration-of-type-focused-websites.html
https://accounting011.netlify.app/research/accounting011-(185)
Express your love with handmade Valentine’s crafts like paper cards, reward ideas,
and decorations.
Ηello! I’ve beern following your blog for a while
noԝ and finally gߋt the bravery tօ ggo ahead and give yоᥙ a
shout out from Austіn Tx! Just wanted to tell you keep up the excellent work!
purchase colchicine online cheap
Haνe you ever considered creating an ebook or gueswt aᥙthoring on other bⅼogs?
I havfe a blog centered on the same information you discuss
andd woᥙld really like to have yoս share some
stories/information. I know my viewers would appreciate your work.
If you are even remotely intereѕted, feel frеe to send mee an email.
https://filedn.eu/lXvDNJGJo3S0aUrNKUTnNkb/accounting20/research/accounting20-(205).html
We even have tea-length dresses and lengthy attire to go well with any season, venue or desire.
https://filedn.eu/lXvDNJGJo3S0aUrNKUTnNkb/accounting21/research/accounting21-(73).html
Don’t be afraid to make an announcement in head-to-toe sparkle.
https://accounting1.b-cdn.net/research/accounting1-(68).html
The two seems below are good examples of timeless type.
https://accounting1004.s3.us-west-004.backblazeb2.com/research/accounting1004-(156).html
Use these as assertion items, perhaps in a brighter color than the the rest of the outfit.
Hello there, just became aware of your blog through Google, and found that
it’s really informative. I am gonna watch out
for brussels. I’ll be grateful if you continue this in future.
Many people will be benefited from your writing. Cheers!
I don’t even understand how I finished up right here, however I thought this publish used to be
good. I do not recognize who you are but definitely you are going to
a famous blogger for those who aren’t already. Cheers!
https://accounting8.b-cdn.net/research/accounting8-(12).html
Reviewers describe it as very slimming and say the beadwork is
exquisite.
І do accept as true with ɑlⅼ оf the ideas you have presented oօn youyr
poѕt. Ƭheү are very convincing аnd can definitely work.
Nonetheless, the posts are very quiϲk for starters. Ⅿay just you pleɑse
extend them a bit from next time? Ƭhank you for the post.
I’ve learn several just right stuff here. Certainly value bookmarking for revisiting.
I wonder how much attempt you put to make one of
these great informative web site.
Having read this I believed it was extremely informative.
I appreciate you spending some time and energy to put this content together.
I once again find myself spending a significant amount of time both reading and commenting.
But so what, it was still worth it!
https://filedn.eu/lXvDNJGJo3S0aUrNKUTnNkb/accounting22/research/accounting22-(71).html
But, if I might add some private advice, ENJOY the journey and process
of it.
Incredible points. Sound arguments. Keep up the amazing
effort.
https://accounting12.b-cdn.net/research/accounting12-(182).html
Think oh-so-elegant bags and fascinators that’ll
full your Mother of the Bride outfit in serious fashion.
https://accounting1015.s3.us-west-004.backblazeb2.com/research/accounting1015-(259).html
Fall and winter weddings call for chic muted tones like silvery grey.
https://chinavisa18.z6.web.core.windows.net/research/chinavisa18-(140).html
Gold, black or navy shoes and accessories would look stylish.
https://storage.googleapis.com/catering10/research/catering10-(457).html
Jovani provides you the highest very finest quality MOB robes for
a low worth.
Excellent goods from you, man. I’ve understand your stuff previous to and
you’re just too great. I actually like what you’ve acquired here,
really like what you are stating and the way in which
you say it. You make it enjoyable and you still care for to keep it smart.
I can not wait to read far more from you. This is actually a great website.
https://accounting-11.fra1.digitaloceanspaces.com/research/accounting11-(344).html
For her daughter’s art-filled Washington, D.C., marriage ceremony, this mom of the bride , donned a quirky, multi-patterned Oscar
de la Renta gown.
I was curious if you ever thought of changing the layout of your blog?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so people
could conject with itt better. Youve got an awful lot of
text for only having one or 2 images. Maybe you
could space it out better?
Also visiit my blog post … 카지노사이트
Hi, just wanted to mention, I enjoyed this blog post. It was funny.
Keep on posting!
Ahaa, its fastidious conversation on the topic of this post at this place at this weblog, I have read all
that, so now me also commenting here.
https://objectstorage.ap-tokyo-1.oraclecloud.com/n/nrswdvazxa8j/b/chinavisa3/o/research/chinavisa3-(20).html
I would possibly play a job in my stepdaughter’s wedding ceremony or I won’t.
Excellent blog here! Also your site loads up fast! What host are you using?
Can I get your affiliate link to your host? I wish my web
site loaded up as quickly as yours lol
https://storage.googleapis.com/accounting0022/research/accounting0022-(111).html
Sleeveless, short-sleeved, or 3/4 length, there is an choice for nearly everyone!.
https://accounting4.b-cdn.net/research/accounting4-(157).html
We requested some wedding fashion specialists to determine what a MOB ought
to wear on the massive day.
Pretty! This has been an extremely wonderful post. Thank you ffor supplying this information.
Heree is my weeb page 카지노사이트
https://storage.googleapis.com/accounting0019/research/accounting0019-(58).html
Grab superb online offers on mom of the bride attire now and get free transport
in the United States.
Tremendous issues here. I am very happy to peer
your article. Thank you so much and I am having a look forward to touch you.
Will you please drop me a mail? https://www.kenpoguy.com/phasickombatives/profile.php?id=1898808
Tremendous issues here. I am very happy to peer your article.
Thank you so much and I am having a look forward to touch you.
Will you please drop me a mail? https://www.kenpoguy.com/phasickombatives/profile.php?id=1898808
Whats up are using WordPress for your site platform?
I’m new to the blog world but I’m trying to get started and set up my own. Do
you need any html coding knowledge to make your own blog?
Any help would be really appreciated!
http://accounting0008.s3-website-ap-northeast-1.amazonaws.com/research/accounting0008-(114).html
When looking for mom of the bride attire, firstly, consider the overall gown code on the invite.
Just desire to say your article is as astounding.
The clearness in your post is simply excellent and
i could assume you are an expert on this subject.
Fine with your permission let me to grab your feed
to keep updated with forthcoming post. Thanks a million and please carry on the gratifying
work.
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 photos or video clips to give your posts more, “pop”!
Your content is excellent but with pics and videos,
this site could certainly be one of the greatest in its field.
Superb blog!
Thank you for some other informative web site.
The place else may just I am getting that kind of info written in such an ideal means?
I have a project that I’m simply now running on, and I have been at the glance out for such info.
excellent points altogether, you just won a new reader.
What could you recommend about your submit that you just made a few days in the past?
Any positive?
https://accounting3.research.au-syd1.upcloudobjects.com/research/accounting3-(170).html
The whole look was the proper match for the couple’s tradition-filled day.
Tremendous issues here. I’m very satisfied to peer your article.
Thank you so much and I’m taking a look forward to touch you.
Will you kindly drop me a mail?
my web blog; สาระน่ารู้ทั่วไป
https://accounting1001.s3.us-west-004.backblazeb2.com/research/accounting1001-(64).html
Guests love to watch the enjoyment and pride appear in your
face as you watch your daughter marry their finest pal.
Ꮤonderful goods from you, man. I’ve understand your stuff previous to and you are jusst too mаgnifіcent.
I actually lіke ѡhat you haѵe acquired here, really lioke what you aare stwting aand the way іn which you say it.
You mmake it entertaining and yyou still take care of to кeep it
wise. I can not wait too read mucһ more fгom you.
This is really a tremendous site.
Hi mates, its wonderful post about educationand
entirely explаined, keep it upp all the time.
Die DCS LiFePO4 200-Ah-Lithiumbatterie (Slim Line) definiert Energieeffizienz in einem schlanken Design neu.
Unser 12-V-200-Ah-Lithium-Ionen-Akku bietet eine hohe Energieabgabe und robuste
Leistung.