Write to stdout instead of file
bash
Solution
Usually you use "-" to specify stdout, but not all commands accept this and I don't about gpg.
For example:
tar -cvzf - foo/ ¦ split -b 50k foobar_
will pipe the "tar-file" to stdout, split it and save to "foobar_<123...>".
Problem
How can I write data to stdout instead of writing file? I'm using GPG and want to print encrypted text to stdout, without saving files. However, with gpg command, encrypted text is written to file in ordinary way: ``` $> gpg --recipient someone@example.com --armor --output encrypted.txt --encrypt example.pdf ``` (With above command, encrypted file is saved in encrypted.txt) What I want to do is like following: ``` $> gpg --recipient someone@example.com --armor --output <STDOUT> --encrypt example.pdf ``` and encrypted messages are shown in console. I don't want to save hard disk to avoid loss of performance.