iproute2mac
iproute2mac copied to clipboard
Oneline output '-o' support
While trying to repair ddclient on OS X (cc @dkerr64), I found that the command ddclient uses:
$reply = `ip -6 -o addr show dev $arg scope global 2>/dev/null`;
Is incompatible with your Linux-compat wrapper due to the '-o' argument. I looked and I think you're already implementing -o by default:
-o, -oneline
output each record on a single line, replacing line feeds with the '\' character. This is convenient when you want
to count records with wc(1) or to grep(1) the output.
So it might be as simple as just ignoring -o when passed.
Thanks for the report, ignoring -o seems like viable fix. Will be implemented in the next version.
@brona Hi, I can't see any commit for the -o
ignoring, has it been implemented yet ?
Not yet, so far it is a FR, if you send a PR I will review it.
So just ignoring the option, is not good enough, actually for ip link
and ip addr
it changes the output considerably and especially for use-case where counting lines matters it is important.