Presently we are using this Batch Script Counter into the Windows Environment, but we need to convert the same one into a Shell Script for Nix Environment.
What are the things need to be Change ?
setlocal enabledelayedexpansion
set /a n=0
set /a m=0
set /a nline=1
set /a mod=0
for /f %%i in (C:\VariableList\Variable.txt -> /home/Variable/AvailableList) do (
  set /a n=m+1
  set /a m=n
  set /a mod=m%%%nline%
  if !mod! EQU 0 (
    run -n -D %%I
    if !ERRORLEVEL! NEQ 0 (
      goto end
    )
  )
)
:end
endlocal