Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I will start receiving many large CSV files, of which only the first few lines are of interest to me. I was hoping to open them by piping only the first few lines to Calc, but this doesn't work:

$ libreoffice4.1 --calc <(head large_file.csv)

Upon trying this, I get a popup:

/dev/fd/63 does not exist.

Is there any easy way to open only the first few lines without creating a new (temporary) file? This is on Kubuntu Linux 12.10 with LibreOffice 4.1.

share|improve this question
Does it need to be in libreoffice? I mean, a simple cat or less won't do? – terdon Jan 3 '14 at 2:10
I prefer Calc as the lines are long (over 30 columns) and are of arbitrary length. I (human) need to read real data out of them. – dotancohen Jan 3 '14 at 2:20
Does this q/a solve your issue? – tohuwawohu Jan 3 '14 at 7:00
@tohuwawohu: Yes, it does set me in the right direction to answer the question. You can link to that post or paraphrase it as an answer, and I'll accept. Thank you tohuwawohu! – dotancohen Jan 3 '14 at 11:24
up vote 2 down vote accepted

Instead of using an unnamed pipe, why not use a named pipe. For example:

% mknod p pipe
% (head large_file.csv > pipe &); libreoffice4.1 --calc pipe
share|improve this answer
Thank you, beautiful solution! It is a rarity when a knowledgeable answer is posted over a year after the question! – dotancohen Mar 21 '15 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .