Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 1998 08:55:54 +1000
From:      Sue Blake <sue@welearn.com.au>
To:        freebsd-questions@FreeBSD.ORG
Subject:   what to learn?
Message-ID:  <19980615085554.56310@welearn.com.au>

next in thread | raw e-mail | index | archive | help
I have a large text file (2-3 megs) with numbers at the beginning of lines.
Currently I'm reading through this file, checking that the numbers go in
sequence, detecting errors but not fixing. This file has a long history of
cutting and pasting without always updating the codes properly :-(

Surely there's a better way, a good incentive for a bit of learning with
a practical application. I dabbled with perl a tiny bit a long time ago
and could relearn but maybe there's another tool that's more appropriate?

Here's the kind of thing that's in the file at the beginning of lines,
and the kind of errors I'm looking for:

SP71d-1
SP71d-1.1
SP71d-1.2
SP71d-1.3
SP71d-2
SP71d-2.1
ST71d-3     # whoops (ST)
ST71d-3.1
ST71d-3.2
ST71d-3.4   # whoops
ST71d-3.5
SP71d-5     # whoops
SP71d-5.1
SP71d-5.2

(many lines of plain text)

CF05c-1
CF05c-1.1
CF05c-2
CF05c-2.1
CF05b-2.2    # whoops
CF05b-2.3
CF05c-2.4
CF05c-2.4    # whoops
CF05c-2.5
CF05c-2.6

(etc... to CF05c-12.15)


The skipped numbers are particularly hard to detect by eyeball.

I'm reasonably confident I can eventually work out how to do this (at
least quicker than reading the damn file) if someone can suggest what to
start learning to use.

TIA

-- 

Regards,
        -*Sue*-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980615085554.56310>