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

Extract specific columns #34

Open
ettom opened this issue Feb 29, 2024 · 2 comments
Open

Extract specific columns #34

ettom opened this issue Feb 29, 2024 · 2 comments

Comments

@ettom
Copy link
Contributor

ettom commented Feb 29, 2024

Having the ability to extract specific columns directly via command line options would greatly improve the UX. Using cut -d' ' works fine until there are string columns which can possibly contain spaces. It's possible to work around this by replacing unescaped spaces with placeholders, but this is already pretty hacky. It would be very nice if you could just give sonnerie an argument like -f 1 to only output the first column.

@njaard
Copy link
Owner

njaard commented Mar 3, 2024

@ettom I implemented it in the select-columns branch. Please give it a review before I merge it :)

Also, I'm considering a ND JSON output format which could be parsed with jq (at a huge performance penalty). Maybe each row would simply be a json array.

@ettom
Copy link
Contributor Author

ettom commented Mar 5, 2024

Tested, reviewed. Other than the very minor comment, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants