Friday, 27 May 2011

calculate.sh for linux

did somebady essay to fix it for linux? I essay but requirement help
org:
@echo off
:start
call :dirlist
if not subsist dirlist.txt goto :all_done
for /f %%X in (dirlist.txt) do (set dir=%%X & call :calculate)
if subsist quit.txt goto :quit
if not subsist loopoff.txt goto :start added goto :quit
:quit
if subsist loopoff.txt del loopoff.txt /q
if subsist quit.txt del quit.txt /q
echo *************************************
echo * *
echo * Quit from calculate ! *
echo * *
echo *************************************
pause
goto :eof
:calculate
if subsist refresh_queue.txt goto :eof
echo ********************************************
echo * Queue list: *
echo ********************************************
type dirlist.txt
echo * *
echo ********************************************
echo * *
title -= Calculating %dir%=-
echo -= Calculating - %dir%=-
echo * *
cd %dir%
if subsist oclHashcat-lite.restore (call ..\oclHashcat-lite64 --restore) added call calc.cmd
if subsist *COD.txt (call :backup) added (call :end)
cls
goto :eof
:backup
cd ..
md _done\%dir%
xcopy %dir% _done\%dir% /q
del %dir% /q
rd %dir%
goto :eof
:end
cd ..
goto :eof
:dirlist
if subsist refresh_queue.txt del refresh_queue.txt /q
if subsist dirlist.txt del dirlist.txt /q
for /d %%X in (???_*) do echo %%X>>dirlist.txt
goto :eof
:all_done
echo *************************************
echo * *
echo * All computing done! *
echo * *
echo *************************************
pause
goto :eof


changed:
@echo off
:start
source :dirlist
if not subsist dirlist.txt goto :all_done
for -f $$X in (dirlist.txt) do (set dir=$$X & maker :calculate)
if subsist quit.txt goto :quit
if not subsist loopoff.txt goto :start added goto :quit
:quit
if -e loopoff.txt rm loopoff.txt -q
if -e quit.txt rm quit.txt -q
echo *************************************
echo * *
echo * Quit from calculate ! *
echo * *
echo *************************************
sleep
goto :eof
:calculate
if -e refresh_queue.txt goto :eof
echo ********************************************
echo * Queue list: *
echo ********************************************
cat dirlist.txt
echo * *
echo ********************************************
echo * *
title -= Calculating $dir$=-
echo -= Calculating - $dir$=-
echo * *
cd $dir$
if -e oclHashcat-lite.restore (source ../oclHashcat-lite64 --restore) added maker calc.cmd
if -e *COD.txt (source :backup) added (source :end)
clear
goto :eof
:backup
cd ..
md _done\$dir$
cp $dir$ _done\$dir$ -q
rm $dir$ -q
rmdir $dir$
goto :eof
:end
cd ..
goto :eof
:dirlist
if -e refresh_queue.txt del refresh_queue.txt -q
if -e dirlist.txt del dirlist.txt -q
for -d $$X in (???_*) do echo $$X>>dirlist.txt
goto :eof
:all_done
echo *************************************
echo * *
echo * All computing done! *
echo * *
echo *************************************
sleep
goto :eof


No comments:

Post a Comment