extract to stdout
Opened this issue · 4 comments
Deleted user commented
It would be very nice to have a way to extract files to stdout. I just want to display the contents of a file without actually extracting the file to disk. This would be useful in cases where I used to use gpg to store a passphrase for a program like offlineimap for example.
skeeto commented
If you feed it input on standard input then Enchive will write to
standard output:
$ enchive extract <mydata.enchive | grep ...
Minor note: authentication only occurs at the very end, and Enchive will
produce unauthenticated output before this point. You can't tell if the
file has been tampered with unless you run it to all the way to the end
and check the exit status.
Deleted user commented
I have tried the following combinations and I get nothing to stdout.
$ enchive extract test.enchive | grep -i * -
$ enchive extract test.enchive | cat -
skeeto commented
You have to supply the input on standard input, not as an argument.
Notice the less than symbol (<):
$ enchive extract <test.enchive | ...
Alternatively, use /dev/stdout as an output file name:
$ enchive extract test.enchive /dev/stdout | ...
Deleted user commented
That makes sense, missed the < before. Thank you!