From 7e5385fd2208161c8cb26041457f30e5e4752e06 Mon Sep 17 00:00:00 2001
From: Gabriele Tijunaityte
Date: Wed, 4 Sep 2024 17:15:54 +0200
Subject: [PATCH 1/2] Solve confusion with bash script
---
index.Rmd | 4 ++--
index.html | 13 ++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/index.Rmd b/index.Rmd
index c9fb4dc..07d25da 100644
--- a/index.Rmd
+++ b/index.Rmd
@@ -589,7 +589,7 @@ rm input.tif
```{block, type="alert alert-success"}
> **Question 6**: Try to write to calculate the NDVI using the lines above in a nice and short shell script.
-- Hint 1: `cd ../data` (to move back from the Bash directory and move into the data directory)
+- Hint 1: use `cd ..` to move to the parent directory
- Hint 2: No spaces in file names are allowed and try to use variables e.g. `fn=$(ls *.tif)`
```
@@ -601,7 +601,7 @@ Let's now check if the range of the NDVI values makes sense, and make a nice scr
echo "teamname"
echo "Current date"
echo "Calculate LandSat NDVI"
-mkdir -p data output
+mkdir output
fn=data/*.tif
echo "The input file(s): $fn"
outfn=output/ndvi.tif
diff --git a/index.html b/index.html
index 68e9f80..78d4ebd 100644
--- a/index.html
+++ b/index.html
@@ -24,8 +24,8 @@
}
});
-