plutoniumm/x

Write outputs to /tmp

Closed this issue · 5 comments

As the title says, stuff saved to tmp might be a good idea. mktemp --tmpdir works for this

Hey this is a nice ideal i'll keep logs of what happened

Is there a clean way to do this in one shot without adding a pipe to every command and/or altering what it does?

You can just use $(mktemp --tmpdir) as an output for commands, assign it to a var etc, it will create the file and print the path:

image

Sorry yeah I understood that, but how do use it in let's say .ts?

bun file.ts > tee tmpfile?

This is obviously doable but I'll have to add one of these in every language which is pretty annoying tbh, is there a better way? Right now I'm willing to settle for just terminal output if its gonna be cumbersome

Sorry yeah I understood that, but how do use it in let's say .ts?

bun file.ts > tee tmpfile?

This is obviously doable but I'll have to add one of these in every language which is pretty annoying tbh, is there a better way? Right now I'm willing to settle for just terminal output if its gonna be cumbersome

No, I mean only for generated files, like when you run tsc, javac or something else. Printing to stdout is good

Ig we're good then, since it already prints everything to stdout. I will keep this idea in mind tho, since I do see the value in some form of logging for back reference