Solved

how can I get color matching in grub in freebsd?

Posted on 2008-10-23
5
738 Views
Last Modified: 2013-12-06
In linux this seems to be working great..

GREP_OPTIONS='--color=auto' ; export GREP_OPTIONS

now sure how to achieve this in freebsd.. can someone help me to get 'color' matched pattern in freebsd

this is what I get in freebsd..

$grep --color=auto
grep: unrecognized option `--color=auto'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
0
Comment
Question by:beer9
  • 3
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
TeRReF earned 125 total points
ID: 22784270
instead of color use colour...

So,

$grep --colour=auto

should work :-)
0
 

Author Comment

by:beer9
ID: 22784299
Again same issue.. --colour is not recognized keyword in grep [freebsd,solaris]
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 22784350
This is my grep version:

grep --version
grep (GNU grep) 2.5.1-FreeBSD

This is the output when I use --colour:

grep --colour=auto file *
d:upload_max_filesize => 2M => 2M
d:Supported handlers => cdb cdb_make inifile flatfile
d:Supported filetypes => JPEG,TIFF
d:fileinfo
d:fileinfo support => enabled
etc...

And file is highlighted nicely.

What version do you use? Did you do a:
man grep

To check if your version does/ does not support the --colour option?

If not, maybe it's time to update your version...
0
 

Author Comment

by:beer9
ID: 22785355
I had a version 2.4, tested in grep version 2.5, working nice!
Thank you :)
0
 
LVL 29

Expert Comment

by:TeRReF
ID: 22785400
You're welcome :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now