要运行命令:
cloc-1.08.exe wizardry
显然,我不想每次想进行行计数时都进入 DOS。
就像pause
命令一样简单:
x.bat:
@echo off
cloc "C:\temp\lua"
pause
双击 x.bat 后在新窗口中输出:
99 text files.
96 unique files.
9 files ignored.
http://cloc.sourceforge.net v 1.08 T=2.0 s (45.0 files/s, 13856.5 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code scale 3rd gen. equiv
-------------------------------------------------------------------------------
C 35 2028 762 11170 x 0.77 = 8600.90
HTML 5 2927 12 6718 x 1.90 = 12764.20
C/C++ Header 24 828 796 1511 x 1.00 = 1511.00
Lua 20 69 71 385 x 4.00 = 1540.00
make 3 67 43 244 x 2.50 = 610.00
CSS 2 10 0 44 x 1.00 = 44.00
DOS Batch 1 2 0 26 x 0.63 = 16.38
-------------------------------------------------------------------------------
SUM: 90 5931 1684 20098 x 1.25 = 25086.48
-------------------------------------------------------------------------------
Press any key to continue . . .
pause
强制窗口保持打开状态,直到您按下一个键或手动关闭命令窗口。
@echo off
cloc-1.08.exe wizardry
pause