Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Count rows in textfile

Re: Count rows in textfile

From: Bunyamin Karadeniz <bunyamink_at_havelsan.com.tr>
Date: Wed, 03 Jul 2002 23:53:21 -0800
Message-ID: <F001.0048FAC0.20020703235321@fatcity.com>


You can do it easily with AWK

awk -f myawk1 /dir1/masters.txt

source of myawk1 is :
BEGIN { } END {print "there are ",NR," lines" }

Bunyamin

My wife recently bought a book called "Unix for Dummies". I'm sure it documents the command you need if you are using any flavor of Unix. For Micromonopoly operating systems, either get a Unix shell emulator such as cygwin or find a Microsoft Press book and see what it says.

Of course, any command that counts rows in a text file will need to open the file -- there is no alternative.
Kevin Kennedy
First Point Energy Corporation

-----Original Message-----

Sent: Wednesday, July 03, 2002 1:43 AM
To: Multiple recipients of list ORACLE-L

Anyone whom has a good example on how to check "how many rows (without opening the file) does a text file consists of? What is the command?

Thanks in advance

Roland

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Roland.Skoldblom_at_ica.se

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: kkennedy
  INET: kkennedy_at_firstpoint.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Bunyamin Karadeniz
  INET: bunyamink_at_havelsan.com.tr

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 04 2002 - 02:53:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US