Is it possible to feed Open Office via STDIN?

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.


Importing textual data

Your questions isn't entirely clear to me but it almost reads as if you have data that you want to import into OpenOffice. If that is the case then I would use one of these approaches below.

CSV file

I'd write that data out to a CSV file (.csv) and then open that file in OpenOffice.

csv2odf

Another idea would be to use the command line tool csv2odf to write your CSV formatted data into an ODF file.

  • http://sourceforge.net/apps/mediawiki/csv2odf/index.php?title=Main_Page

Real file

Just opening a file

However if you're simply just trying to open a ODF document from the command line then you should be able to do it like so:

$ openoffice "$openOfficeDoc"

Importing binary data

Piping contents to OpenOffice

In looking at this several ways I do not believe there is a method that will allow you to do the following:

$ echo "$data" | openoffice

The limiting factor is not Linux though. You can echo data stored in variables just fine, and pipe it to tools that know how to open incoming file data on their STDIN.

Example

$ echo $data|strings| head -10
[Content_Types].xml 
E`2+
)+Bp_9
no+yV
2q^QF
M xv
C1lA
d:NA
_rels/.rels 
b"gi

The limiting factor here is OpenOffice. In looking through it's options I saw no method for coaxing it to open data via STDIN. It only knows how to open files.