I'm working with a tool which is exactly like windows cmd. my input text file is :
My batch file reads the lines from this input and splits the lines by “ ; ” then executes a function with the token and age file from the second field and after all parses the output for the third line. now I have problem with one string in out.txt which is
in the following you see my current batch file
for /f "tokens=1,2,3* delims=;" %%a in (input.txt) do (
REM create token file
sinoparam -p D:\product\%%b 0x0100001F > out.txt
for /f %%y in ('findstr /C:"%%c" out.txt ^| sed "s/.*%%c .............. ) do SET RESULT=%%y
in my batch file I want to do the following:
-find this string by findstr/C
-if the value is lower than 1000 round it and show the result
-if it’s greater than 1000 first divide it by 32 and then round the result
Does anyone know how I can do this ?
thanks for any help!
message edited by elaheh