Skip to contentSkip to conversation

iproute2 - one line mode should be deprecated?

DISCUSSION Stephen Hemminger 4 participants 4 messages Dec 9, 2022 – Dec 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The one line output mode of iproute2 commands was invented before I was involved. It looks like the only real usage is for scripts to consume the output of commands. Now that JSON is supported, the one line mode is just lingering technical debt.

Does anyone still use oneline mode?
Could it be removed in some future version of iproute?

There are still output format bugs in oneline, and some missing bits of JSON support as well.

#1 lore raw

I'm terribly old-fashioned myself and still use one-line mode, and the kinds of scripts I use still use awk. I may be the last one standing here...

Quoted 10 lines · Stephen Hemminger

The one line output mode of iproute2 commands was invented before I was involved. It looks like the only real usage is for scripts to consume the output of commands. Now that JSON is supported, the one line mode is just lingering technical debt.

Does anyone still use oneline mode?
Could it be removed in some future version of iproute?

There are still output format bugs in oneline, and some missing bits of JSON support as well.

Signature · 3 lines
This song goes out to all the folk that thought Stadia would work:
https://www.linkedin.com/posts/dtaht_the-mushroom-song-activity-6981366665607352320-FXtz
Dave Täht CEO, TekLibre, LLC
#2 lore raw
Quoted 4 lines · Dave Taht

I'm terribly old-fashioned myself and still use one-line mode, and the kinds of scripts I use still use awk. I may be the last one standing here...

I use oneline a lot as well for a quick list of netdevs and network addresses.

#3 lore raw

David Ahern <[email protected]> :

Quoted 8 lines · Dave Taht
Quoted 4 lines

I'm terribly old-fashioned myself and still use one-line mode, and the kinds of scripts I use still use awk. I may be the last one standing here...

I use oneline a lot as well for a quick list of netdevs and network addresses.

Either that or diff as well as socket list ('ss') here.

I'm probably < 50 vs > 50 between plain 'ss' output + masochistic awk and one line output + gory grep/sed/cut ('ss' does not even produce json).

'ss' oneline output option differs from 'ip' one: it does not help using either imho :o/

Deprecation then removal won't hurt me.

Signature · 1 line
Ueimor