Get primary nic

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_get_primary_nic

Purpose

Print the interface name from the first default route.

Output

Writes the fifth field from the first ip route show default line, or an empty line if none.

Returns

Returns the pipeline status; an absent route does not necessarily produce an error.

Usage

  sgnd_get_primary_nic