Skip to content

mkdir during put/tee? #1096

Answered by srstsavage
srstsavage asked this question in Q&A
Discussion options

You must be logged in to vote

Actually, doing directory creation as a separate first step seems to be the way to go. Both of these complete in less than a second:

mlr --csv uniq -g Date then put -q 'system("mkdir -p date-hierarchy/".$Date)' data.csv
mlr --csv --headerless-csv-output uniq -g Date data.csv | xargs -I{} mkdir -p date-hierarchy/{}

I am curious if it's possible to do this in a single step with tee, but the two-step approach is perfectly acceptable.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by srstsavage
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants