[csw-maintainers] cswinetd and cswetcservices?

Philip Brown phil at bolthole.com
Wed May 5 19:42:31 CEST 2010


On Wed, May 5, 2010 at 9:49 AM, Ben Walton <bwalton at opencsw.org> wrote:
> /usr/xpg4/bin/grep -q "^$svcname[[:space:]].*$port_proto.*$PKGINST" /etc/services

> Excerpts from Maciej (Matchek) Blizinski's message of Wed May 05 12:35:38 -0400 2010:
>
>> /usr/xpg4/bin/grep might not exist, depending on the initial package
>> set when installing Solaris.
>
> *mumble mumble* Is there a posix grep that is guaranteed to be
>  available?
>

dont think so. use awk or sed?
Modifying the original, under the "skip the CSWxxx"  principle you
recently said:


awk '$1=="'$svcname'" && $2=="'$port_proto'" {print "found"}' /etc/services

should print out a value if found, or nothing, if not found.


More information about the maintainers mailing list