All pastes #365989 Raw Edit

Untitled

public text v1 · immutable
#365989 ·published 2007-02-21 12:20 UTC
rendered paste body
if test $# -gt 0
then
	echo "umsatzdatei: "
	read umsatzd
	if test -f $umsatzd
	then
		for i
		do
			if test -f $i && test -s $i && test -r $i
		
			then
				kn=`awk '{print $1}' $i`
				rb=`awk '{print $2}' $i`
				rd=`awk '{print $3}' $i`
				
				umsatzalt=`egrep $kn $umsatzd | awk '{print $2}'`
				echo $umsatzalt
				echo $rb
				umsatzneu=`expr $umsatzalt + $rb`
				echo $umsatzneu
			
			else
				echo "rechnung existiert nich oder ist leer oder nicht lesbar" >> errmsgs
			fi
		done
		
	else
		echo "keine umsatzdat beende" >> errmsgs
	fi

	

else
echo "kein param" >> errmsgs
fi