grep command on Solaris 9

前端 未结 1 1659
醉酒成梦
醉酒成梦 2021-01-28 05:15

I faced a strange behavior of a grep command on Solaris 9. For example , I have a host file with two lines:

1.1.1.1 host

1.2.3.4 host-MY

I\'d like to gre

1条回答
  •  无人及你
    2021-01-28 06:02

    You're probably not calling the good grep executable. Run which grep to know which one you are running. On my Solaris box, the official grep is in:

    > which grep
    /usr/xpg4/bin/grep
    

    The man page on my Solaris box refers to both /usr/bin/grep and /usr/xpg4/bin/grep. Only the latest supports these options.

    0 讨论(0)
提交回复
热议问题