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

Applying multiple filter operations into a single run #1590

Closed
karudonaldson opened this issue Jun 17, 2024 · 2 comments
Closed

Applying multiple filter operations into a single run #1590

karudonaldson opened this issue Jun 17, 2024 · 2 comments

Comments

@karudonaldson
Copy link

karudonaldson commented Jun 17, 2024

I currently have multiple filters in separate scripts.
mlr --csv filter '$COLUMN1 == "TEST1"' input.csv > output.csv

mlr --csv filter '$COLUMN2 == "TEST2"' input.csv > output.csv

What is the correct syntax to run these together as a single operation?

I tried using && with no luck
mlr --csv filter '$COLUMN1 == "TEST1"' && '$COLUMN2 == "TEST2"' input.csv > output.csv

@johnkerl
Copy link
Owner

@karudonaldson I would suggest

mlr --csv filter '$COLUMN1 == "TEST1" && $COLUMN2 == "TEST2"' input.csv > output.csv

@karudonaldson
Copy link
Author

@karudonaldson I would suggest

mlr --csv filter '$COLUMN1 == "TEST1" && $COLUMN2 == "TEST2"' input.csv > output.csv

Knew it was something simple thanks @johnkerl :)

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