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

[Sheflug] Extracing data from a file



>>>>> "jose" == j l gomez-dans <Jos> writes:

    jose> Hi, A question for all you awk/sed/perl wizards out there. I
    jose> have a file which has a number of records in the following
    jose> fashion

    jose> id_string 'i' N a1,b1 a2,b2 ...  a_{N/2},b[N/2}


    jose>     After each of these records, a new one is found. I want
    jose> to split this single file into a number of files. Each new
    jose> file will have the name id_string, and the content of the
    jose> file will be exactly the same record that is present in the
    jose> initial file. The number of a,b data points is specified by
    jose> N (there are N a and N b points).

    jose>     Can anyone shed any light? I have tried using cut&paste,
    jose> but I have of the order of 250 records on each of the 20
    jose> files, so it is a bit _tedious_

Are the records seperated by a blank line, or anything similar?
What does the id_string look like? Letters, letters and numbers, a
particular combination?


Cheers.

Baz.


-- 
Barrie J. Bremner		OpenPGP public key ID: F78CEE08
baz [at] barriebremner.com	http://barriebremner.com/


___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.