Solved

how can I get color matching in grub in freebsd?

Posted on 2008-10-23
5
742 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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 …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

810 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