and here is batch attempt: ::==== begin batchscript @echo off & setlocal enabledelayedexpansion set prev=. for /f "tokens=*" %%a in (animals) do ( if /i "%%a" neq "!prev!" ( set /a num+=1 set numout=!num!. ) else ( set numout= ) echo !numout!%%a set prev=%%a ) ::==== end batchscript
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.