[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: load file, skip comment lines

From: John W. Eaton
Subject: Re: load file, skip comment lines
Date: Fri, 26 Jan 2007 01:11:58 -0500

On 25-Jan-2007, address@hidden wrote:

|   Hi All,
| if you know your_file.txt has exactly, 4 header lines, sthing like this
| should do
|   system ("perl -ne 'print unless $. <= 4' <  your_file.txt > tmp.txt")
|   x = load tmp.txt
|   unlink ("tmp.txt")
| To delete all lines starting by '#', use
|   system ("perl -ne 'print unless /^#/' <  your_file.txt > tmp.txt")

I think load function already ignores lines beginning with either # or %,
assuming those lines don't look likeg the header of the Octave text
format.  But I don't recall that the OP told us the format of the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]