Skip to content

Commit 5182ef3

Browse files
committed
nice batch file to get the line which is wrong
1 parent 2f3c94a commit 5182ef3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/character_count.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@ECHO OFF
2+
SET "inputFile=.\ems_translations.csv"
3+
powershell -NoLogo -NoProfile -Command ^
4+
"$counter = 0;" ^
5+
"Get-Content -Path '%inputFile%' |" ^
6+
"ForEach-Object {" ^
7+
"$counter++;" ^
8+
"$ns = $_ -replace ';','';" ^
9+
"if (($_.Length - $ns.Length) -ne 11) {" ^
10+
"'Iteration {0}: Length is {1}' -f $counter, ($_.Length - $ns.Length)" ^
11+
"}" ^
12+
"}"

0 commit comments

Comments
 (0)