China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-29 17:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to display the total number of lines in a text View 2,907 Replies 17
Floor 16 Posted 2007-12-24 10:59 ·  中国 江苏 常州 溧阳市 电信
银牌会员
★★★
Credits 2,404
Posts 946
Joined 2005-09-08 13:44
20-year member
UID 42345
Status Offline
Think this is also not bad

@echo off
type a.txt|find /v /c ""
pause
简单!简单!再简单!
Floor 17 Posted 2007-12-31 16:11 ·  中国 广东 广州 天河区 电信
初级用户
Credits 36
Posts 15
Joined 2007-11-23 17:11
18-year member
UID 103536
Gender Male
Status Offline
Originally posted by terse at 2007-12-2007-12-24 10:59 AM:
Feels like this is also not bad

@echo off
type a.txt|find /v /c ""
pause



This method has the highest efficiency, and the result can be obtained quickly.
Floor 18 Posted 2007-12-31 18:53 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Typing "type a.txt|find /v /c "" " is slower than "find /v /c "" a.txt"
Forum Jump: