Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Count rows in textfile
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 Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
--
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 Liststo: 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
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message