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
Changing the signature of the write- commands #287
Comments
|
Thanks for the thought-provoking question! I'll try to answer the question and add some commentary. On the questionInput dataSuppose we start with
So the signature is approximately
We can think of these commands as having the signature
How to get the desired resultWe can get the results you wanted with
The same technique works for json:
Explanation of outputThat output is consistent with the signature
which means the
where
The CSV case works the same way:
where
CommentaryI think the logic is consistent between the two. But as you suggest, this makes the raw
Open questions
|
ls -l | mario map 're.split("\s+", x)' write-json
This gives a list of arrays (an array of arrays would seem nicer, but ok)
ls -l | mario map 're.split("\s+", x)' write-csv-tuples
This splits each item with commas and groups the items in a line with double newlines... Huh?
Ubuntu 18.04 / Python 3.8.0 in a virtualenv without system site packages.
The text was updated successfully, but these errors were encountered: