![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
get the number of lines in a text file
What is the command to get only the number of lines in a text file
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: get the number of lines in a text file
Hi,
Try: Measure-Object -Line Tao Ma "Jason1008" <Jason1008@discussions.microsoft.com> 写入消息新闻:3FD77F51-6A68-4CB3-AEB4-359945622150@microsoft.com... > What is the command to get only the number of lines in a text file |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: get the number of lines in a text file
@(get-content .\file.txt -totalCount -1).count
# short version @(gc .\file.txt -t -1).count -- Kiron |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |