Re: scripting question

From: Liddle Craig - cliddl (CLIDDL@ACXIOM.CO.UK)
Date: Thu May 22 2003 - 11:21:48 EDT


try

awk 'NR != num {exit 1}' num=$desired $file

Or something along those lines

-----Original Message-----
From: John Dunn [mailto:john.dunn@SEFAS.CO.UK]
Sent: 22 May 2003 14:57
To: aix-l@Princeton.EDU
Subject: scripting question

Is it possible to write a one line command that will test whether a file
contains a specific number of lines, returning 0 if it dies, 1 if it doesn't

I've been playing around with wc and test with no luck.

John

**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:51 EDT