From 5f62c6da5a8093f70b75e84122156a70059ea0ea Mon Sep 17 00:00:00 2001 From: Remko Scharroo Date: Sat, 4 Jan 2025 18:29:36 +0100 Subject: [PATCH] Fix GMT_App_M_1?.sh so it passes test (#8668) --- doc/scripts/GMT_App_M_1a.sh | 8 +++----- doc/scripts/GMT_App_M_1b.sh | 8 +++----- doc/scripts/GMT_App_M_1c.sh | 8 +++----- doc/scripts/GMT_App_M_1d.sh | 8 +++----- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/doc/scripts/GMT_App_M_1a.sh b/doc/scripts/GMT_App_M_1a.sh index 1234f112222..2bd5bd39b0d 100755 --- a/doc/scripts/GMT_App_M_1a.sh +++ b/doc/scripts/GMT_App_M_1a.sh @@ -46,13 +46,11 @@ y=0.375 y2=0.25 while [ $i -le $n ] do - j1=$(expr $n - $i) - j2=$(expr $n - $i + 1) if [ $i -eq $n ]; then - plot $(sed -n ${j2}p tt.lis) 3.05 + plot $(sed -n 1p tt.lis) 3.05 else - plot $(sed -n ${j1}p tt.lis) 1.55 - plot $(sed -n ${j2}p tt.lis) 4.50 + plot $(sed -n $(expr $n - $i )p tt.lis) 1.55 + plot $(sed -n $(expr $n - $i + 1)p tt.lis) 4.50 fi i=$(expr $i + 2) y=$(gmt math -Q $y $dy ADD =) diff --git a/doc/scripts/GMT_App_M_1b.sh b/doc/scripts/GMT_App_M_1b.sh index 20f2688cb3d..4f7752f9834 100755 --- a/doc/scripts/GMT_App_M_1b.sh +++ b/doc/scripts/GMT_App_M_1b.sh @@ -46,13 +46,11 @@ y=0.375 y2=0.25 while [ $i -le $n ] do - j1=$(expr $n - $i) - j2=$(expr $n - $i + 1) if [ $i -eq $n ]; then - plot $(sed -n ${j2}p tt.lis) 3.05 + plot $(sed -n 1p tt.lis) 3.05 else - plot $(sed -n ${j1}p tt.lis) 1.55 - plot $(sed -n ${j2}p tt.lis) 4.50 + plot $(sed -n $(expr $n - $i )p tt.lis) 1.55 + plot $(sed -n $(expr $n - $i + 1)p tt.lis) 4.50 fi i=$(expr $i + 2) y=$(gmt math -Q $y $dy ADD =) diff --git a/doc/scripts/GMT_App_M_1c.sh b/doc/scripts/GMT_App_M_1c.sh index cb3b2cd92ea..e808ff36e84 100755 --- a/doc/scripts/GMT_App_M_1c.sh +++ b/doc/scripts/GMT_App_M_1c.sh @@ -46,13 +46,11 @@ y=0.375 y2=0.25 while [ $i -le $n ] do - j1=$(expr $n - $i) - j2=$(expr $n - $i + 1) if [ $i -eq $n ]; then - plot $(sed -n ${j2}p tt.lis) 3.05 + plot $(sed -n 1p tt.lis) 3.05 else - plot $(sed -n ${j1}p tt.lis) 1.55 - plot $(sed -n ${j2}p tt.lis) 4.50 + plot $(sed -n $(expr $n - $i )p tt.lis) 1.55 + plot $(sed -n $(expr $n - $i + 1)p tt.lis) 4.50 fi i=$(expr $i + 2) y=$(gmt math -Q $y $dy ADD =) diff --git a/doc/scripts/GMT_App_M_1d.sh b/doc/scripts/GMT_App_M_1d.sh index 09835e3c6dc..7bb38219ea9 100755 --- a/doc/scripts/GMT_App_M_1d.sh +++ b/doc/scripts/GMT_App_M_1d.sh @@ -46,13 +46,11 @@ y=0.375 y2=0.25 while [ $i -le $n ] do - j1=$(expr $n - $i) - j2=$(expr $n - $i + 1) if [ $i -eq $n ]; then - plot $(sed -n ${j2}p tt.lis) 3.05 + plot $(sed -n 1p tt.lis) 3.05 else - plot $(sed -n ${j1}p tt.lis) 1.55 - plot $(sed -n ${j2}p tt.lis) 4.50 + plot $(sed -n $(expr $n - $i )p tt.lis) 1.55 + plot $(sed -n $(expr $n - $i + 1)p tt.lis) 4.50 fi i=$(expr $i + 2) y=$(gmt math -Q $y $dy ADD =)