grep - Unix: Egrep -a in solaris -


i need equivalent of "egrep -a " option in solaris.

currently option works fine in red hat linux, wanted migrate code in server in solaris flavour.

so need know equivalent of "egrep -a " in solaris.

thanks.

the feature requested (see manual) documented

-a --text

process binary file if text; equivalent --binary-files=text option.

--binary-files=type

if file's allocation metadata, or if data read before line selected output, indicate file contains binary data, assume file of type type. default, type ‘binary’, , grep outputs either one-line message saying binary file matches, or no message if there no match. when matching binary data, grep may treat non-text bytes line terminators.

if type ‘without-match’, grep assumes binary file not match; equivalent -i option.

if type ‘text’, grep processes binary file if text; equivalent -a option.

warning: ‘--binary-files=text’ might output binary garbage, can have nasty side effects if output terminal , if terminal driver interprets of commands.

solaris grep (see manual) has no such feature. third-party packages available, e.g., cswggrep opencsw.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -