Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Count rows in textfile
> 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?
I don't know about "without opening the file."
However, you can use the utility 'wc' with the -l flag to count rows in a file.
The syntax is: wc -l filename
wc can also count rows from stdin with wc: wc -l < filename
-- /Nils Höglund, Naqua KB E-mail: nils_at_naqua.se Web: http://www.naqua.se/ Home Phone: +46 (0)18 30 09 19 Cellular Phone: +46 (0)709 91 97 65 Address: Nya Valsätrav. 26 B SE-756 46 Uppsala, Sweden -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: =?iso-8859-1?Q?Nils_H=F6glund?= INET: nils_at_naqua.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).Received on Wed Jul 03 2002 - 04:43:20 CDT