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
I got this web page from my pal who informed me concerning this
web page and now this time I am browsing this site and reading very informative articles or reviews here.
Thanks ᴠery inteгesting blog!
Aⅼso visit my site … huay online
Movie Laos ดูหนัง ดูหนังผ่านเน็ต เว็บดูหนังฟรี ดูหนังhd ดูหนังใหม่ ดูซีรีย์ออนไลน์ Movie-Laos.com
Does your site have a contact page? I’m having trouble locating it but, I’d like to send you an email.
I’ve got some creative ideas for your blog you might be interested in hearing.
Either way, great website and I look forward to seeing it improve over time.
My coder is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the
costs. But he’s tryiong none the less. I’ve been using WordPress
on numerous websites for about a year and am anxious about switching to another platform.
I have heard very good things about blogengine.net. Is there
a way I can import all my wordpress posts into it?
Any help would be really appreciated!
Bundajitu
Asking questions are in fact fastidious thing
if you are not understanding anything entirely, however this post presents good understanding
even.
Официальный сайт 1WIN казино позволяет игрокам запускать азартные игры, получать бонусы, участвовать в турнирах 1win официальный сайт
Have you ever thought about adding a little bit more
than just your articles? I mean, what you say is valuable and
everything. However just imagine 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 most beneficial
in its field. Great blog!
Fantastic goods frοm you, man. I havе understand
ylur stuff previous to and you’re jhst too wonderful. I really
like what you have acquіred heгe, really like wjat you
are sating and tthe ԝay in whicһ you say it. You make it entertаining and you still
take care of to keeр it wisе. I can’t wait to
read much mօre from yⲟu. Ꭲhis is аctually a terrific
website.
Also visit mmy page :: bitlife online
Today, I went to the beach with my kids. I found a sea shell and gave
it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell
to her ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell someone!
I have read so many posts regarding the blogger lovers however this
article is truly a nice piece of writing, keep it up.
Hello Dear, are you in fact visiting this web page daily,
if so then you will without doubt get nice know-how.
hello there and thank you for your information – I have certainly picked
up anything new from right here. I did however expertise a few
technical points using this web site, since I experienced to reload the web site lots
of times previous to I could get it to load correctly.
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 could damage your quality score if advertising and marketing with Adwords.
Well I’m adding this RSS to my e-mail and could look out for much more of your
respective fascinating content. Make sure you update this again soon.
It’s a shame you don’t have a donate button! I’d definitely donate to this
excellent blog! I suppose for now i’ll settle for book-marking and adding your RSS feed where to find sex near me
(Nathaniel) my Google account.
I look forward to new updates and will share this blog with my Facebook group.
Chat soon!
This is the perfect site for anybody who wants to
find out about this topic. You know so much its almost tough to argue with you
(not that I really will need to…HaHa). You definitely put
a brand new spin on a subject that has been discussed for many years.
Great stuff, just great!
Good post! We are linking to this great content on our website.
Keep up the good writing.
Look at my web page: binary options
Do you mind if I quote a couple of your posts as long as I provide credit
and sources back to your weblog? My blog is in the very same niche as yours and my visitors would really benefit from a lot of the information you provide
here. Please let me know if this alright with you. Regards!
%%
my web page; https://roundsardiniarace.it/2024/01/04/better-online-casinos/
Thank you for the good writeup. It in fact was a
amusement account it. Look advanced to more added agreeable from you!
However, how can we communicate?
Feel free to visit my website; slot online
Ηi, i read your blog occasionally and i own a similar one and i was juѕt wondering if yⲟu
ցet ɑ lot of spam comments? If ѕo һow ԁο you protect ɑgainst
іt, any plugin or anything you can recommend?
I get so muсh lately it’s driving me insane so any helⲣ iѕ νery mucһ appreciated.
Αlso visit mу web blog – lotto gamble (Caitlyn)
Online Sex
blog topic
https://digi4.research.au-syd1.upcloudobjects.com/research/digi4-(117).html
She’s a superhero to you and your complete family, so why not let her dress the part.
Appreciate it for this fantastic post, I am glad I found this internet site on yahoo.
Hello, after reading this remarkable post i am too happy to share my experience here with colleagues.
Great beat ! I wish to apprentice while you amend your web site, how could i subscribe for a blog web site?
The account aided me a acceptable deal. I had been a
little bit acquainted of this your broadcast provided bright clear idea
Feel free to surf to my site Massage Wertungen (Romaine)
Enhancing Workspaces in the Heart of Winter Park: Serotonin Centers
In the vibrant city of Winter Park, creating efficient and comfortable workspaces
is paramount, and Serotonin Centers excels in providing
top-notch office furniture solutions. Serving neighborhoods like Audubon Park and Azalea Park, the company
stands as a go-to resource for businesses looking to enhance their work environments.
Established in Winter Park in 1887, Serotonin Centers boasts a rich history of
contributing to the city’s growth. With a population of 29,131 residents in 12,612 households, Winter Park is
a city known for its cultural diversity and thriving communities.
Connected by the major highway I-4, residents in neighborhoods like Baldwin Park and College Park have easy
access to the extensive range of office furniture offered by Serotonin Centers.
In Winter Park, where temperatures vary, and businesses strive for
excellence, the cost of office furniture repairs can vary.
Serotonin Centers addresses this need by providing reliable and cost-effective solutions for businesses seeking durable and stylish office
cubicles, desks, chairs, and tables.
Winter Park boasts a range of captivating points of interest, including the historic Casa Feliz Historic Home
Museum and the scenic Dinky Dock Park. Residents can enjoy these
attractions while also benefitting from Serotonin Centers’
expertise in creating functional and aesthetically
pleasing workspaces.
Choosing Serotonin Centers in Winter Park is synonymous with choosing quality and innovation in office furniture solutions.
With a commitment to excellence and a diverse range of furniture options,
the company ensures that businesses in Winter Park have access to the best resources for creating productive and inspiring work environments.
”
“Elevating Work Environments in Colonial Town Center: Serotonin Centers at the Forefront
Colonial Town Center, nestled in the heart of Winter Park, is home to
a thriving business community, and Serotonin Centers plays
a pivotal role in enhancing work environments.
Specializing in office furniture solutions, the company caters to the unique needs of neighborhoods like Colonialtown North and Coytown, providing businesses with top-quality furniture options.
With roots dating back to 1887, Serotonin Centers has been an integral part of Winter Park’s growth and development.
The city, boasting a population of 29,131 residents across 12,
612 households, is known for its rich cultural tapestry.
Accessible via the major highway I-4, Colonial Town Center and its surrounding neighborhoods, like Delaney Park, enjoy convenient access to the diverse range of office furniture offered by Serotonin Centers.
In Winter Park, where temperature variations are common, the cost of office furniture repairs can fluctuate.
Serotonin Centers addresses this need by offering businesses
in Colonial Town Center reliable and budget-friendly solutions for office cubicles, desks, chairs, and tables.
Colonial Town Center is surrounded by points of interest, including
the historic Downtown Winter Park and the vibrant Audubon Park Garden District.
Businesses in the area can draw inspiration from these local attractions while benefiting
from Serotonin Centers’ expertise in creating productive and aesthetically pleasing workspaces.
Choosing Serotonin Centers in Colonial Town Center is not just
a practical decision; it’s a commitment to quality and innovation in office furniture solutions.
With a diverse range of options and a focus on customer satisfaction,
the company remains a trusted partner for businesses striving
for excellence in their work environments.
”
“Crafting Inspiring Workspaces in the Heart of Audubon Park: Serotonin Centers’ Expertise
In the picturesque surroundings of Audubon Park, Serotonin Centers stands as a beacon for businesses seeking to create
inspiring workspaces. Specializing in office furniture solutions, the company caters to the diverse needs of neighborhoods like Baldwin Park and Bryn Mawr,
contributing to the development of vibrant and efficient
work environments.
Founded in Winter Park in 1887, Serotonin Centers has played a
significant role in shaping the city’s growth.
Winter Park, with a population of 29,131 residents in 12,612 households, is
celebrated for its cultural richness. Audubon Park,
conveniently connected by the major highway I-4, benefits from Serotonin Centers’ wide
range of office furniture options.
In a city where temperatures can vary, and businesses are keen on excellence, the cost of office furniture repairs becomes
a crucial factor. Serotonin Centers addresses this need by offering businesses in Audubon Park reliable and cost-effective solutions for
office cubicles, desks, chairs, and tables.
Audubon Park is surrounded by fascinating points
of interest, such as the Audubon Park Garden District and the serene
Blue Jacket Park. Local businesses can draw inspiration from these attractions while also benefitting from Serotonin Centers’ expertise in crafting workspaces that foster
creativity and productivity.
Choosing Serotonin Centers in Audubon Park is not just a practical decision; it’s an investment in the
quality and aesthetics of office furniture solutions.
With a commitment to providing businesses with
innovative and tailored options, the company remains a trusted partner for those striving to create workspaces that inspire success.
”
“Innovative Workspaces in the Heart of East Park: Serotonin Centers Leading the Way
East Park, a dynamic and growing neighborhood in Winter Park,
finds its ally in Serotonin Centers when it comes to
creating innovative workspaces. Specializing in office furniture
solutions, the company serves the unique needs of neighborhoods like Delaney Park and
Dover Estates, contributing to the evolution of dynamic and efficient
work environments.
Established in Winter Park in 1887, Serotonin Centers has been an integral part of
the city’s development. Winter Park, with a population of 29,131 residents in 12,612 households,
showcases a harmonious blend of cultural diversity. East Park, connected
by the major highway I-4, enjoys seamless access to Serotonin Centers’ extensive range of office furniture options.
In a city where temperature variations are common and businesses prioritize excellence, the cost of office
furniture repairs becomes a key consideration. Serotonin Centers addresses this need by
offering businesses in East Park reliable and budget-friendly solutions for office cubicles, desks, chairs, and tables.
East Park is surrounded by captivating points of interest, including the scenic Dinky
Dock Park and the historic Downtown Winter Park. Local businesses
can draw inspiration from these attractions while also benefiting from Serotonin Centers’ expertise in crafting workspaces that
foster collaboration and productivity.
Choosing Serotonin Centers in East Park is not
just a pragmatic choice; it’s an investment in quality and functionality in office
furniture solutions. With a commitment to providing businesses with tailored options and innovative designs, the company remains a trusted partner for those
seeking to create workspaces that drive success.
”
“Elevating Work Environments in the Heart of Carver Shores: Serotonin Centers’ Impact
Nestled in the vibrant community of Carver Shores, Serotonin Centers takes center stage in transforming work environments with its innovative
office furniture solutions. Specializing in catering to the distinct needs of neighborhoods like Clear Lake and College Park, the
company plays a pivotal role in shaping dynamic and efficient workplaces.
Founded in 1887, Serotonin Centers has been an integral part of Winter
Park’s growth story. Winter Park, home to 29,131 residents across 12,612 households, boasts a rich cultural heritage.
Carver Shores, conveniently connected by the major highway I-4, benefits from Serotonin Centers’ diverse
range of office furniture options.
In a city where temperature variations are a common occurrence,
and businesses prioritize excellence, the cost of office furniture repairs becomes a crucial factor.
Serotonin Centers addresses this need by providing businesses in Carver Shores with reliable
and budget-friendly solutions for office cubicles, desks,
chairs, and tables.
Carver Shores is surrounded by enticing points of interest, such as the community-centric Central
Park and the historic Downtown Winter Park.
Local businesses can draw inspiration from these attractions while
also benefiting from Serotonin Centers’ expertise in crafting
workspaces that foster productivity and collaboration.
Choosing Serotonin Centers in Carver Shores is not just a practical decision; it’s
an investment in quality and functionality in office furniture solutions.
With a commitment to providing businesses with tailored options and cutting-edge designs, the company remains a trusted partner for those aiming to create workspaces that drive success.
I’m not that much of a internet reader to be honest but your sites
really nice, keep it up! I’ll go ahead and bookmark your website to come
back later on. Cheers
My web-site: atlantis333
May I simply say what a relief to discover someone who actually knows what they’re talking about
on the net. You certainly know how to bring an issue to light and make it important.
A lot more people ought to read this and understand this side of your story.
I can’t believe you aren’t more popular since you surely possess the gift.
Here is my website: atlantis333
ed pills levitra
Fantastic goods from you, man. I’ve understand your stuff previous to and you are just extremely great.
I really like what you’ve acquired here, really like what you are saying and the
way in which you say it. You make it enjoyable and you still care for to keep it sensible.
I can not wait to read far more from you. This is really a great site.
Look at my site – slot online
Официальный сайт 1WIN казино позволяет игрокам запускать азартные игры, получать бонусы, участвовать в турнирах 1win сайт
This is my first time pay a quick visit at here and i am truly impressed to read everthing at
single place.
Hello there! I know this is kinda off topic but
I’d figured I’d ask. Would you be interested in trading links or maybe guest writing
a blog post or vice-versa? My site addresses a lot of the same subjects as yours and
I believe we could greatly benefit from each other. If you’re interested feel free to send me an e-mail.
I look forward to hearing from you! Terrific blog by the way!
Fantastic post!
Check out: https://en.webcamsex.site/
Very good article. I definitely love this website.
Keep it up!
Hey I am so delighted I found your web site, I really found you
by accident, while I was browsing on Askjeeve for something
else, Nonetheless I am here now and would just like to say thanks for a marvelous post
and a all round interesting blog (I also love the theme/design), I don’t have time to go through it
all at the moment but I have saved it and also
added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep
up the great job.
Официальный сайт 1WIN казино позволяет игрокам запускать азартные игры, получать бонусы, участвовать в турнирах 1win зеркало сайта
Официальный сайт 1WIN казино позволяет игрокам запускать азартные игры, получать бонусы, участвовать в турнирах 1win
Hi, i tһink that i saw you visited myy weblog thus
i came to “return the favor”.I am attеmpting to find things to enhance my web site!I suρpose its ok tto use somе of your іdeas!!
1win Регистрация на официальном сайте 1вин. Как зарегистрироваться в 1win БК 1win позаботился о создании удобного, функционального сайта для своих клиентов 1win войти
Hey! Would yⲟu mind if I sһare your blog with my twitter group?
There’s a lot of folks hat I think ԝould really appreciate your content.
Please let me know. Thаnks
Официальный сайт 1WIN казино позволяет игрокам запускать азартные игры, получать бонусы, участвовать в турнирах 1win официальный сайт вход
Fantastic! Check out:
https://https://www.livejasmin.co.za
Nice post. Ӏ waѕ checking cߋnstantly this blog ɑnd I’m impressed!
Veгy helpful information partіcularly tһе last ρart :
) I care foг ѕuch informɑtion ɑ lot. І waѕ looking for this certaіn informatіon fߋr a ⅼong tіme.
Thɑnk you and best of luck.
Review my blog post :: lottery
always i used to read smaller articles that also clear their motive,
and that is also happening with this article which I
am reading at this time.
Ꮐood post. I learn something new annd challenging on blogs I stumbleupon everyday.
It will always be useful to read through content fromm other ѡriters and use
a ittle something from otһer websites.
Hi, I do believe this is an excellent site. I stumbledupon it 😉 I am going to revisit yet again since I bookmarked it.
Money and freedom is the best way to change, may you be rich and continue to guide other people.
Look into my web page; atlantis 333
When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added
I get three e-mails with the same comment. Is there any way
you can remove me from that service? Thanks!
I’m impressed, I must say. Rarely do I come across a blog that’s
both equally educative and amusing, and let me tell you, you’ve hit the nail on the head.
The issue is something not enough folks are speaking intelligently about.
I am very happy I found this in my hunt for something concerning this.
I’m really enjoying the theme/design of your website.
Do you ever run into any internet browser compatibility issues?
A few of my blog visitors have complained about my blog not working correctly
in Explorer but looks great in Firefox. Do you have any suggestions to help
fix this issue?