Subject Batch file under linux
Author Philippe Makowski
sorry, but my linux knowledge is too weak
Is there someone for translating this batch file from dos to linux ?

Thanks a lot

F:
CD "ProgramInterBase corpinterbaseBin"
MD F:DATAREPGDBBACKUP
COPY F:DATAREPGDBBACKUPREPGDB.GBK F:DATAREPGDBBACKUPREPGDB.OLD
echo ------------------------------------------------- >>
F:DATAREPGDBREPGDB.LOG
echo Shutdown Database... >> F:DATAREPGDBREPGDB.LOG
gfix -shut -attach 30 F:DATAREPGDBREPGDB.GDB -user SYSDBA -pass masterkey
if errorlevel 1 GOTO NOT_SHUT
echo ------------------------------------------------- >>
F:DATAREPGDBREPGDB.LOG
echo Sauvegarde Database... >> F:DATAREPGDBREPGDB.LOG
gbak -B -t -user SYSDBA -pass masterkey F:DATAREPGDBREPGDB.GDB
F:DATAREPGDBBACKUPREPGDB.GBK
if errorlevel 1 GOTO NOT_BACKEDUP
echo Sauvegarde de F:DATAREPGDBREPGDB.GDB ok >> F:DATAREPGDBREPGDB.LOG
echo ------------------------------------------------- >>
F:DATAREPGDBREPGDB.LOG
echo Restauration Database... >> F:DATAREPGDBREPGDB.LOG
gbak -R -user SYSDBA -pass masterkey -p 4096 F:DATAREPGDBBACKUPREPGDB.GBK
F:DATAREPGDBREPGDB.GDB
if errorlevel 1 GOTO NOT_RESTORED
echo Restauration de F:DATAREPGDBREPGDB.GDB ok >> F:DATAREPGDBREPGDB.LOG
echo ------------------------------------------------- >>
F:DATAREPGDBREPGDB.LOG
echo Remise en ligne... >> F:DATAREPGDBREPGDB.LOG
gfix -online F:DATAREPGDBREPGDB.GDB -user SYSDBA -pass masterkey
if errorlevel 1 GOTO NOT_ONLINE
echo F:DATAREPGDBREPGDB.GDB a nouveau en ligne. TERMINE. >>
F:DATAREPGDBREPGDB.LOG
GOTO END_BATCH
:NOT_SHUT
echo Le Shutdown de F:DATAREPGDBREPGDB.GDB a echoue ! >>
F:DATAREPGDBREPGDB.LOG
GOTO END_BATCH
:NOT_BACKEDUP
echo La sauvegarde a echoue ! >> F:DATAREPGDBREPGDB.LOG
GOTO END_BATCH
:NOT_RESTORED
echo La restauration a echoue ! >> F:DATAREPGDBREPGDB.LOG
GOTO END_BATCH
:NOT_ONLINE
echo F:DATAREPGDBREPGDB.GDB n'a pas pu etre remise en ligne ! >>
F:DATAREPGDBREPGDB.LOG
GOTO END_BATCH
:END_BATCH
del *.tmp
echo ------------------------------------------------- >>
F:DATAREPGDBREPGDB.LOG
EXIT