added exercise 5_5

This commit is contained in:
jakob.schratter 2025-12-10 09:25:33 +01:00
commit 18f4633f0f
30 changed files with 214553 additions and 0 deletions

20
ex5/ex5_5/nl.awk Normal file
View file

@ -0,0 +1,20 @@
#
# Have to add a newline for a new row of coordinates
#
BEGIN { OFS=" "; YO=-1.23456789; X=YO; Y=YO; Z=YO }
{
if ($1!="")
{
if ($1!=YO) { print " "; YO=$1 }
if ($1==X && $2==Y)
{
# print $1,$2,($3+Z)/2
}
else
{
print $1,$2,$3
}
X=$1; Y=$2; Z=$3;
}
}
END {}