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
God oversikt! Jeg ville også sjekket bonusvilkårene nøye, særlig omsetningskrav og hvor lenge bonusen er gyldig
free casino cash no deposit usa, best online slot sites new zealand and usa online casinos
for real money, or safe online casino westlake la australia
Bra påminnelse om å se forbi bonusbeløpet. Jeg sjekker alltid om vilkårene sier hvor mange ganger bonusen må omsettes, og om Trustly faktisk støttes for både innskudd og uttak Klikk for kilde
Bra påminnelse om å se forbi bonusbeløpet. Jeg sjekker alltid om vilkårene sier hvor mange ganger bonusen må omsettes, og om Trustly faktisk støttes for både innskudd og uttak
pokies online australia reviews, free spin casinos united kingdom and $5 minimum deposit casino australia 2021, or pay by phone bill lady hammer casino
bonus codes 2022 (Esmeralda) australia
Fint at dere sammenligner flere sider, men jeg ville også sjekket bonusvilkårene nøye før jeg registrerer meg https://holtonfaso.raindrop.page/bookmarks-77587478
Fint at dere sammenligner flere sider, men jeg ville også sjekket bonusvilkårene nøye før jeg registrerer meg
Hello to every body, it’s my first pay a quick visit of this web site; this web site contains
awesome and actually good stuff designed for visitors.
bonanza slot volatility, united statesn roulette odds and canadian online casino
tokens (Ruben) that
accepts paypal, or no deposit gambling sites usa
You actually make it appear really easy along with your presentation but I find this topic
to be actually something which I think I would by no means understand.
It kind of feels too complicated and very extensive for me.
I’m having a look ahead for your subsequent submit,
I will try to get the hang of it!
best online casino bc australia, new gambling sites usa and gambling in the uk statistics, or united statesn online casino best
Feel free to surf to my page: is it easy to win at blackjack – Sherrill –
Your means of explaining the whole thing in this article
is really good, all be capable of easily know it, Thanks a lot.
canadian valentine casino
guide blackjack chart, jackpot city casino united states review and united kingdom best online casino, or online casino in canada 2021
casino Uden rofus esbjerg (Localcontrolpanel.com) med 1000 gratis spins
canadian online bingo games, argos uk poker chips and online casino canada
roulette, or poker usa tournaments
My web site; Redkings no deposit bonus code
These are genuinely great ideas in on the topic of blogging.
You have touched some pleasant things here. Any
way keep up wrinting.
Klasse zusammengefasst in das Thema Wohnen mit Verantwortung.
Ich habe schon lange nach solchen Tipps gesucht und finde hier
genau das Richtige. Liebe Grüße.
Here is my web page; https://andreashausgartenwerk.forumfree.it/?t=81240514
how to win slot machines canada, online casino australia
reddit and all slots flash casino australia, or fishin freuky slot
Also visit my web-site; daiwa td black blackjack spinning rod 7ft 1-3kg (Karolyn)
Spot on with this write-up, I honestly think this site needs
much more attention. I’ll probably be back again to
read through more, thanks for the advice!
มีอะไรให้คิด จริงๆ ฉันไม่เคยรู้มาก่อน
Feel free to surf to my blog; THE88 คาสิโน
سؤالم اینه که آیا گفتوگوی آنلاین
برای شناخت شخصیت کافیه؟ طبیعتاً هیچ روش
یکسانی برای همه وجود نداره.
Ϝeel free tο surf to my webb blоg بازی انفجار چیست آموزش کامل روش بازی برای مبتدیها
aristocrat pokies real money united kingdom, united kingdom online casinos and online
no deposit casino play bonus real money canada, or apple pay online casino united states
free should i apply for casino credit (Merlin) games in united states,
best online pokies australia 2021 and united statesn online
casinos 2021 real money, or bet365 united statesn roulette betting
betrouwbaar casino site beste gokkasten met turbo spin ideal
no deposit online pokies nz, gsn grand casino for pc online australia real
money and real money online casinos united states,
or bingo no deposit bonus win real money united
states
Siti scommesse italiani con bonus vittoria campionato italiano
slot machines ontario united states, online gambling uk statistics bet on red and black roulette; Stevie,
free bonus no deposit casino usa, or fishin freuky slot
united states gambling sites, mobile poker real money australia and online
poker real money usa 2021, or top 10 Doubledown casino free online canada
all new zealandn casino, united kingdom roulette free
download and spin palace casino canada download, or fort erie monopoly Casino apuestas Deportivas ontario united kingdom
when will pokies reopen south united states, skrill united
states gambling and new gambling sites australia, or poker online uk free
Feel free to visit my web page – is gateway casino open today
(Olga)
What’s up to all, it’s truly a pleasant for me to pay a visit this web page, it includes important Information.
legal gambling sites canada, united kingdom no deposit signup bonus casino and no deposit bonus slots australia, or are there casinos in usa
My web-site; winning Betting strategies for roulette
roulette online canada, online united statesn roulette simulator and free bonus
no deposit casino usa, or usa casino no deposit bonus
Feel free to visit my page :: can i make a living
off gambling (phumtropic.com)
casino čEské Automaty S Bonusem Bez Vkladu curacao licencí bonus
ขายยาสอด ยาทำแท้ง
ยาสอดทำแท้ง ยายุติการตั้งครรภ์
ยาขับเลือด ยาขับประจำเดือนcytotec cytolog ru486
ปรึกษาได้ตลอด 24 ชม.
ยาที่ใช้ยุติการตั้งครรภ์
ยาที่ใช้ในกระบวนการยุติการตั้งครรภ์สามารถแบ่งออกเป็นสองประเภทหลัก คือ:
1. เม็ดยาทำแท้ง (Medical abortion pills):
– Mifepristone (เมฟริสโตน): เป็นยาที่ใช้เพื่อยับยั้งฮอร์โมนเพศซึ่งช่วยให้การตั้งครรภ์ไม่สามารถพัฒนาต่อไปได้
– Misoprostol (มิโซโพรสโตล): เป็นยาที่ใช้เพื่อกระตุ้นการมีเกร็งและการถ่ายเอาลูกน้ำออก
2. กระตุ้นการตั้งครรภ์ด้วยฮอร์โมน (Hormonal
methods):
– ยาเม็ดคุมกำเนิดฉีด:
คือการใช้ฮอร์โมนคุมกำเนิดเข้าไปในร่างกายเพื่อยับยั้งการตั้งครรภ์
วิธีการใช้ยาและเกณฑ์การใช้งานของยาทำแท้งจะแตกต่างกันไปตามประเทศและกฎหมายท้องถิ่น
ฉะนั้น การใช้ยาทำแท้งควรทำภายใต้คำแนะนำและการดูแลของแพทย์ที่เชี่ยวชาญด้านนี้เท่านั้น
เพื่อรักษาความปลอดภัยและประสิทธิภาพในกระบวนการยุติการตั้งครรภ์
line : @2planned
https://69cytotac.com
Asking questions are really fastidious thing if you are not understanding anything fully, however this article gives nice understanding
yet.
Hi my friend! I want to say that this post is awesome, great
written and include almost all important infos. I would like
to see extra posts like this .
najbolja aplikacija za tipove
Feel free to visit my homepage – Online kladionice
Magnificent goods from you, man. I have keep in mind your
stuff previous to and you’re just too wonderful. I really like what you have acquired right here, certainly like what you’re stating and
the way in which you say it. You’re making it entertaining and you still care
for to keep it smart. I can not wait to read far more from you.
That is actually a wonderful website.
A useful first step for career preparation is to write down one specific question. The following check
is to look carefully at the information already recorded.
A small comparison sheet can show which questions remain unanswered.
For an illustrative exercise, consider two different ways forward and explain what could change the decision. The written note should keep uncertain points
explicit. A closer review can expose a missing point, but the
effort should match the importance of the choice. Talyca notes provides related material to
consider. At the end of the comparison, revisit the question you started with and record
one useful follow-up. Make the next action specific so another reader can understand the choice.
real money united statesn online casino, australia casino pokies and can you play poker for money
online in united kingdom, or canadian online casinos pokies
Feel free to surf to my web site internet gambling software (Bobbie)
online casino games online strategy (Mae) united states that accept paysafe,
bouka spins no deposit bonus and $5 minimum deposit casino australia 2021, or casino uk paypal
best different casino table games bonus
new zealand, is there a casino in taunton and best slot sites australia, or best
canada poker sites
150 free spins australia, best australian Casino estoril lisbon portugal sites and best online pokies
in new zealand with neosurf, or canadian online slot machines
bet365 money casino usa, united kingdom casino open at niagara falls (Jamal) documentary online and top
100 usa casino sites, or latest australian slot machines
united statesn roulette builders, wild life slots australia and bug bausaai slots, or united statesn poker tour
Here is my web site … golden century casino game
fair go australia pokies, free 50 pokies no deposit sign up bonus united kingdom and best
casino sites in canada, or usa online casinos free play
Review my site: What Is A Unit Gambling
bedste dream catcher live Casino med highroller bonus
– scottdivendesigns.Com –
australian online casinos that accept paypal, gambling in ontario australia and canadian casinos still accepting skrill, or online
slots guide uk
Stop by my web site: Types of roulette wheels
bingo canada sign up, in casino in usa and 25 roulette video game free spins on registration no deposit usa, or canadian no
deposit casino 2021