Re: Start complex UNIX-Script with wodSSH - WeOnlyDo Discussion board

Re: Start complex UNIX-Script with wodSSH (General questions)

by Zitterbacke, Tuesday, March 28, 2006, 12:08 (6613 days ago) @ wodSupport

Hello,

yes, I will start a UNIX-Script synchron with wodSSH (in Vb6) on an UNIX-Server(LINUX).
Sorry , our UNIX-Server is behind a Firewall. I am not the System-Admin for this. I can't change the permission.


Here a Example (for cartography) of the UNIX-Scripts:

The complex UNIX-Script with other UNIX-Scripts and C-programs.
Sorry, with german commentar!

[code]
#!/bin/bash

#===========================================================================
#
# Rasterisierungen End-Aufbereitung der Karte und der Legende
#
#
#===========================================================================

#--- Notwendige Aenderungen fuer plot25.exe ---
cd $HOME
. .profile
cd $HOME/DTK25/TAB
#--- F. Schneller ---

if [ $# -ne 1 ]
then
echo Falscher Prozeduraufruf (Falsche Anzahl ($#) der Argumente)
echo Aufruf: tu_map_leg Blattnummer
exit
fi

#---
# Nur Auskommentiert, falls doch einmal ein anderer Server verwendet wird! F.S.
#---
# SERVER_tk25=`pg server_tk25.txt`
# LOGIN_tk25=`pg login_tk25.txt`
# PASS_tk25=`pg pass_tk25.txt`
# DIR_tk25=`pg dir_tk25.txt`
#---

echo =============================================================
echo = Start Berechnung Karte und Legende Blatt $1 =
echo =============================================================


if [ ! -d $HOME/DTK25/$1 ]
then
mkdir $HOME/DTK25/$1
fi

cd $HOME/DTK25/$1

############# Aufrufprozeduren holen ################################

cp $HOME/DTK25/TAB/* .
chmod 777 tu*


#============================================================================
# Sonderfaelle: Ueberkartierungen
#============================================================================

ANZ_SPA_LEG=8000
ANZ_ZEI_LEG=17000
AUFL=320
ANZ_SPA=18000
ANZ_ZEI=17000

if [ $1 = 6643 ]
then
(( ANZ_SPA = ANZ_SPA + 9693*$AUFL/1000 ))

elif [ $1 = 7248 ]
then
(( ANZ_SPA = ANZ_SPA + 1000*$AUFL/1000 ))

elif [ $1 = 7348 ]
then
(( ANZ_SPA = ANZ_SPA + 1656*$AUFL/1000 ))

elif [ $1 = 7645 ]
then
(( ANZ_ZEI = ANZ_ZEI + 3703*$AUFL/1000 ))

elif [ $1 = 7842 ]
then
(( ANZ_SPA = ANZ_SPA + 10677*$AUFL/1000 ))

elif [ $1 = 7942 ]
then
(( ANZ_SPA = ANZ_SPA + 9362*$AUFL/1000 ))

elif [ $1 = 8143 ]
then
(( ANZ_SPA = ANZ_SPA + 1952*$AUFL/1000 ))

elif [ $1 = 8336 ]
then
(( ANZ_ZEI = ANZ_ZEI + 8097*$AUFL/1000 ))

elif [ $1 = 8337 ]
then
(( ANZ_ZEI = ANZ_ZEI + 8168*$AUFL/1000 ))

elif [ $1 = 8344 ]
then
(( ANZ_ZEI = ANZ_ZEI + 12500*$AUFL/1000 ))

elif [ $1 = 8526 ]
then
(( ANZ_SPA = ANZ_SPA + 3380*$AUFL/1000 ))

elif [ $1 = 8531 ]
then
(( ANZ_ZEI = ANZ_ZEI + 3000*$AUFL/1000 ))

elif [ $1 = 8532 ]
then
(( ANZ_ZEI = ANZ_ZEI + 2820*$AUFL/1000 ))

elif [ $1 = 8533 ]
then
(( ANZ_ZEI = ANZ_ZEI + 8168*$AUFL/1000 ))

elif [ $1 = 8543 ]
then
(( ANZ_ZEI = ANZ_ZEI ))

fi

#=============================================================================
# Kartenteil berechnen
#=============================================================================

echo Start Berechnung Kartenteil Blatt $1 mit ...
echo ........ tu_end_DTK25 $1 $ANZ_SPA $ANZ_ZEI $AUFL

tu_end_DTK25 $1 $ANZ_SPA $ANZ_ZEI $AUFL | tee tu_end_DTK25.prot 1>/dev/null

#=============================================================================
# Legendenteil berechnen
#=============================================================================

echo Start Berechnung Legendenteil Blatt $1 mit ...
echo ......... tu_end_LEG25 $1 $ANZ_SPA_LEG $ANZ_ZEI_LEG $AUFL

tu_end_LEG25 $1 $ANZ_SPA_LEG $ANZ_ZEI_LEG $AUFL | tee tu_end_LEG25.prot 1>/dev/null

#=============================================================================
# Kartenteil und Legendenteil zusammenfassen
#======================================================================


Complete thread: