Web lists-archives.com

Re: sometimes i go huh (grep result)




On Mon, Aug 27, 2018 at 10:36:12AM -0400, songbird wrote:
> me@ant(25)$ env | grep -F "-g"
> grep: invalid option -- 'g'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> me@ant(26)$ env | grep -F '-g'
> grep: invalid option -- 'g'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> me@ant(27)$ env | grep -F 'CFL'
> CFLAGS=-g
> me@ant(28)$ env | grep '\-g'
> CFLAGS=-g
> me@ant(29)$ env | grep '-g'
> grep: invalid option -- 'g'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> me@ant(30)$ env | grep "-g"
> grep: invalid option -- 'g'
> Usage: grep [OPTION]... PATTERN [FILE]...
> Try 'grep --help' for more information.
> 
> 
try this:

env |grep [-]g

Regards,

-Roberto

-- 
Roberto C. Sánchez