Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
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
2  
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

1 Answer 1

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 at 21:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.