Link to home
Start Free TrialLog in
Avatar of beer9
beer9Flag for India

asked on

how can I get color matching in grub in freebsd?

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.
ASKER CERTIFIED SOLUTION
Avatar of TeRReF
TeRReF
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of beer9

ASKER

Again same issue.. --colour is not recognized keyword in grep [freebsd,solaris]
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...
Avatar of beer9

ASKER

I had a version 2.4, tested in grep version 2.5, working nice!
Thank you :)
You're welcome :)