I have an Open Office Spreadsheet document stored inside a bash variable. I want to do something like the following to feed Open Office via STDIN:echo $openOfficeDoc | oofficeBut it doesn't work.Note: The content of the bash variable must not be written to disk.I'll emphasize that I'm trying to pass to Open Office the actual data of the file.I'm trying to store passwords in an Open Office Spreadsheet file. The passwords are encrypted using GPG. I don't want the passwords to be written to disk for security reasons.The bash variable value is a binary blob of an Open Office Spreadsheet document. It is not ASCII.The bash code I used to create the blob is:data=$(cat Encrypted.gpg | gpg -u Dor -d)While Encrypted.gpg is an encrypted file of an Open Office Spreadsheet.Is it possible to feed Open Office via STDIN?
Is it possible to feed Open Office via STDIN?
bash;pipe;stdin;openoffice
I don't think OpenOffice can be convinced to read from its standard input. But that doesn't matter. Just write the data to a temporary file.You don't want the passwords to be written to disk. That's fine. Write them to a file that isn't stored on disk.Many systems use an in-memory filesystem (tmpfs) for /tmp. Solaris has been doing that for ages; Linux distributions have been slow to come to the mix (Fedora 18 adopted it, Debian and Ubuntu still haven't budged) so it usually requires the system administrator to set it up manually. However, modern Linux distributions mount a tmpfs filesystem somewhere; recent versions of the standard library require it. The standard location for tmpfs is /run, with /run/shm being world-writable (same permissions as /tmp), but some distributions may not have it yet; look at /dev/shm and perhaps other locations.