Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oneline output '-o' support #17

Open
floatingatoll opened this issue Jun 14, 2017 · 4 comments · May be fixed by #62
Open

Oneline output '-o' support #17

floatingatoll opened this issue Jun 14, 2017 · 4 comments · May be fixed by #62

Comments

@floatingatoll
Copy link

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.

@brona
Copy link
Owner

brona commented Jun 4, 2018

Thanks for the report, ignoring -o seems like viable fix. Will be implemented in the next version.

@sebma
Copy link

sebma commented Nov 14, 2020

@brona Hi, I can't see any commit for the -o ignoring, has it been implemented yet ?

@brona
Copy link
Owner

brona commented Nov 18, 2020

Not yet, so far it is a FR, if you send a PR I will review it.

@brona
Copy link
Owner

brona commented Mar 21, 2022

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.

@brona brona changed the title '-o addr' isn't parsed Oneline output '-o' support Aug 1, 2024
@waketzheng waketzheng linked a pull request Sep 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants