From owner-freebsd-questions Sun Jun 14 15:56:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA21393 for freebsd-questions-outgoing; Sun, 14 Jun 1998 15:56:38 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from phoenix.welearn.com.au (suebla.lnk.telstra.net [139.130.44.81]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA21254 for ; Sun, 14 Jun 1998 15:56:05 -0700 (PDT) (envelope-from sue@phoenix.welearn.com.au) Received: (from sue@localhost) by phoenix.welearn.com.au (8.8.5/8.8.5) id IAA06643; Mon, 15 Jun 1998 08:55:58 +1000 (EST) Message-ID: <19980615085554.56310@welearn.com.au> Date: Mon, 15 Jun 1998 08:55:54 +1000 From: Sue Blake To: freebsd-questions@FreeBSD.ORG Subject: what to learn? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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