S6-GETSERVBYNAME(8)

NAME
s6-getservbyname - simple command-line interface to the getservbyname(3) function, converting a service name and protocol into a port number

SYNOPSIS
s6-getservbyname name proto

DESCRIPTION
s6-getservbyname looks up the network services database for an entry containing name name and protocol proto.

It prints the corresponding port number to stdout, then exits 0.

If it cannot find a related entry, it exits 1.

EXAMPLES
On a standard machine with a correct /etc/services file and a non-garbled NSS configuration:

    s6-getservbyname smtp tcp

prints ‘25’.

SEE ALSO
This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-networking/s6-getservbyname.html

AUTHORS
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)