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
https://ilde2.upf.edu/clatmooc/v/hva
Howdy! This post could not be written any better!
Reading this post reminds me of my previous room mate!
He always kept talking about this. I will forward this article to him.
Pretty sure he will have a good read. Many thanks for sharing!
Check out my web-site – Erotik Forum
Some truly superb articles on this website, appreciate it for contribution. “Careful. We don’t want to learn from this.” by Bill Watterson.
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 Movable-type on a variety of
websites for about a year and am worried about
switching to another platform. I have heard very good
things about blogengine.net. Is there a way I can import all my wordpress content
into it? Any kind of help would be really appreciated!
ST666️ – Trang Chủ Chính Thức Số 1️⃣ Của Nhà Cái ST666
ST666 đã nhanh chóng trở thành điểm đến giải trí cá độ thể thao được yêu thích nhất hiện nay. Mặc dù chúng tôi mới xuất hiện trên thị trường cá cược trực tuyến Việt Nam gần đây, nhưng đã nhanh chóng thu hút sự quan tâm của cộng đồng người chơi trực tuyến. Đối với những người yêu thích trò chơi trực tuyến, nhà cái ST666 nhận được sự tin tưởng và tín nhiệm trọn vẹn từ họ. ST666 được coi là thiên đường cho những người chơi tham gia.
Giới Thiệu Nhà Cái ST666
ST666.BLUE – ST666 là nơi cá cược đổi thưởng trực tuyến được ưa chuộng nhất hiện nay. Tham gia vào trò chơi cá cược trực tuyến, người chơi không chỉ trải nghiệm các trò giải trí hấp dẫn mà còn có cơ hội nhận các phần quà khủng thông qua các kèo cá độ. Với những phần thưởng lớn, người chơi có thể thay đổi cuộc sống của mình.
Giới Thiệu Nhà Cái ST666 BLUE
Thông tin về nhà cái ST666
ST666 là Gì?
Nhà cái ST666 là một sân chơi cá cược đổi thưởng trực tuyến, chuyên cung cấp các trò chơi cá cược đổi thưởng có thưởng tiền mặt. Điều này bao gồm các sản phẩm như casino, bắn cá, thể thao, esports… Người chơi có thể tham gia nhiều trò chơi hấp dẫn khi đăng ký, đặt cược và có cơ hội nhận thưởng lớn nếu chiến thắng hoặc mất số tiền cược nếu thất bại.
Nhà Cái ST666 – Sân Chơi Cá Cược An Toàn
Nhà Cái ST666 – Sân Chơi Cá Cược Trực Tuyến
Nguồn Gốc Thành Lập Nhà Cái ST666
Nhà cái ST666 được thành lập và ra mắt vào năm 2020 tại Campuchia, một quốc gia nổi tiếng với các tập đoàn giải trí cá cược đổi thưởng. Xuất hiện trong giai đoạn phát triển mạnh mẽ của ngành cá cược, ST666 đã để lại nhiều dấu ấn. Được bảo trợ tài chính bởi tập đoàn danh tiếng Venus Casino, thương hiệu đã mở rộng hoạt động khắp Đông Nam Á và lan tỏa sang cả các quốc gia Châu Á, bao gồm cả Trung Quốc
game online f662899
Hello, i think that i saw you visited my site thus i came to
“return the favor”.I’m trying to find things to enhance my website!I suppose its ok to
use some of your ideas!!
It is appropriate time to make some plans for the future and it is time
to be happy. I’ve read this post and if I could I desire
to suggest you few interesting things or tips. Perhaps you could
write next articles referring to this article. I want to read even more things about it!
Good day! This is my first comment here so I just wanted to give a quick shout out and say
I truly enjoy reading your posts. Can you recommend any other blogs/websites/forums that cover the same subjects?
Thanks a ton!
I blog quite often and I really appreciate your information.
This article has really peaked my interest.
I’m going to take a note of your site and keep checking for new details about once per
week. I opted in for your RSS feed as well.
I enjoy you because of all of your effort on this web page. My mom enjoys making time for investigations and it is easy to see why. All of us hear all concerning the compelling way you create insightful tips and hints via the web site and therefore welcome participation from some other people about this idea then our girl is certainly becoming educated a great deal. Take advantage of the remaining portion of the year. You’re performing a tremendous job.
What’s up colleagues, how is everything, and what you would like to say on the topic of this post, swim with whales in tonga my view its in fact amazing designed for me.
HD porn
españa,camiseta de españa,camiseta españa mundial,camiseta españa 2022,
camisetas españa,camiseta de españa 2022,camiseta españa 2023,camiseta de españa mundial 2022,camisetas de españa,camiseta seleccion española,camiseta seleccion española
2022,camiseta selección española mundial 2022,camisetas selección española,equipacion españa mundial 2022,equipacion españa,segunda equipacion españa,equipacion españa 2022,equipacion de españa,camisetas futbol spain,equipacion seleccion española,
equipacion seleccion española 2022,equipacion españa 2023
fre pon [http://www.endo-mall.com/bbs/board.php?bo_table=free&wr_id=795497]
You explained that fantastically!
my webpage: Kyle Laramie VCC – https://allmyfaves.com/VCCHC –
Hi there! Thіs іs my first viit to your blog! We arre a team oof volunteers ɑnd starting a new initiative in a community in tһe same niche.
Your blog provided us bеneficial information to
wߋrk on. You have dοne a marvellouѕ job!
Hello, this weekend is fastidious designed for me, for the
reason that this moment i am reading this great informative piece
of writing here at my home.
Pretty nice post. I just stumbled upon your blog and wanted to mention that
I have truly loved surfing around your weblog posts.
In any case I’ll be subscribing for your rss feed and I’m hoping
you write once more very soon!
Here is my web blog; swim with humpback whales
It’s in point of fact a nice and helpful piece of information.
I am satisfied that you just shared this helpful info with us.
Please keep us up to date like this. Thanks for sharing.
I’ve been browsing on-line more than three hours today, but
I never discovered any interesting article like yours.
It’s pretty value enough for me. In my opinion, if all site owners
and bloggers made good content as you probably did, the internet can be a lot
more helpful than ever before.
my site … swim with humpback whales tonga
I used to be able to find good info from your blog posts.
This article is genuinely a nice one it assists new net users, who are wishing for blogging.
Feel free to visit my page … whale swimming
Terrific postings. Thanks a lot!
What’s up to every one, it’s actually a nice for me to go to see this web site, it consists of important Information.
Wonderful article! We will be linking to this particularly great article on our website.
Keep up the good writing.
First off I would like to say wonderful blog! I had a quick question in which I’d like to
ask if you don’t mind. I was curious to know how you center yourself and clear your thoughts before writing.
I have had a hard time clearing my mind in getting my
ideas out. I do take pleasure in writing but it just seems like the first 10 to 15 minutes tend to be wasted simply just trying to figure
out how to begin. Any ideas or hints? Appreciate it!
Also visit my homepage … humpback whale swimming
Hey, you used to write fantastic, but the last several posts have been kinda boring… I miss your super writings. Past few posts are just a little out of track! come on!
Great goods from you, man. I’ve understand your stuff
previous to and you are just too magnificent. I
actually like what you’ve acquired here, really like what
you’re saying and the way in which you say it.
You make it entertaining and you still take care of to keep it wise.
I cant wait to read much more from you. This
when is the whale season in tonga really a tremendous website.
Howdy would you mind stating which blog platform you’re working with?
I’m planning to start my own blog soon but I’m having a tough time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design and style seems different then most blogs
and I’m looking for something completely unique.
P.S Sorry for being off-topic but I had to ask!
Hi there! I could hve sworn I’ve been to this website before but after going through some of the posts
I realized it’s new tto me. Anyhow, I’m certainly happy I stumbled upon it and
I’ll be book-marking it and checking back frequently!
payday loan
Elite Garage Door Services of Northwest Arkansas
103 E Alpine St Suite 2
Siloam Springs, AR 72761
(479) 636-7658
https://k53rsa.co.za/question/a-h-garage-door-service-8/
Amazing blog! Is your theme custom made or did you download it from somewhere?
A design like yours with a few simple tweeks would really
make my blog shine. Please let me know where you got
your theme. With thanks
Hi there, just became alert to your blog through Google, and found that it’s really informative.
I am going to watch out for brussels. I will be grateful
if you continue this in future. Numerous people will be benefited from your writing.
Cheers!
Also visit my web-site :: Pinterest
Highly descriptive article, I liked that bit. Will there be a part 2?
My website whale watching tonga best time
I pay a visit daily a few sites and blogs to read posts, however this
blog provides quality based writing.
Look at my website tonga humpback whale season
Hello, I think your blog might be having browser
compatibility issues. When I look at your website in Ie, it looks fine but when opening in Internet
Explorer, it has some overlapping. I just wanted to give you
a quick heads up! Other then that, awesome blog!
If you wish for to improve your familiarity only keep visiting this
web site and be updated with the newest news update posted here.
Hi, the whole thing is going perfectly here and ofcourse every one is sharing data, that’s genuinely
good, keep up writing.
I couldn’t resist commenting. Exceptionally well written!
I’m gone to tell my little brother, that he should also pay a quick visit this web site on regular basis to take
updated from most up-to-date gossip.
I have recently started a web site, the info you offer on this site has helped me tremendously. Thank you for all of your time & work. “Everyone is responsible and no one is to blame.” by Will Schutz.
login hoki1881
Great post. I am experiencing a few of these
issues as well..
Touche. Great arguments. Keep up when is the whale season in french polynesia great spirit.
Hi there, just wanted to tell you, I enjoyed this post.
It was practical. Keep on posting!
My brother suggested I might like this website. He was entirely right.
This post truly made my day. You cann’t imagine just
how much time I had spent for this information! Thanks!
Even though this post is certainly informative, I’d like to take a minute to express my views on a unique, yet
fascinating topic – the Unitree Go2. This is a compact, quick, and extremely sophisticated quadruped robot that is engineered to be user-friendly to
all. It’s astonishing how it can navigate challenging terrains and carry out
a variety of tasks, making it a fantastic tool for
either academic and fun purposes. The Go2’s
advanced AI technology and robust build quality are truly admirable.
I feel it’s a significant step ahead in the realm of robotics and automation. Excited to seeing how
it will be used in several sectors in the coming years.
https://conservatives.click/index.php?do=/public/blog/view/id_119667/title_/
buy viagra online