Takumi0104 / MNXB11-homework

Apache License 2.0
0 stars 1 forks source link

Evaluation of the submitted smhifilter.sh #5

Open floridop opened 2 days ago

floridop commented 2 days ago

Since this script depends on smhicleaner.sh, that script must be in the same folder according to this line:

https://github.com/Takumi0104/MNXB11-homework/blob/40e18fb0db19aae88b5c315270f6b90a53e6d1d5/dev/smhifilter.sh#L79

but since the file is not there this is what I get as a result of the execution:

% ./smhifilter.sh baredata_smhi-opendata_1_52230_20210906_212532.csv
shmicleaner.sh script not found in /export/pflorido/git-ext/MNXB11/2024/2024MNXB11-homework_TN/dev. Cannot continue. Exiting

I tried copying the original smhicleaner.sh as your code looked ok, and this is the result:

f% ./smhifilter.sh baredata_smhi-opendata_1_52230_20210906_212532.csv 
Redirecting filter logs to 2024-11-20_smhifilter.sh.log
[2024-11-20T16:17:39+01:00 Filter]: Calling smhicleaner.sh script
Redirecting cleaner logs to 2024-11-20_smhicleaner.sh.log
[2024-11-20T16:17:39+01:00 Cleaner]: Copying input file baredata_smhi-opendata_1_52230_20210906_212532.csv to original_baredata_smhi-opendata_1_52230_20210906_212532.csv
[2024-11-20T16:17:39+01:00 Cleaner]: Finding the first line containing 'Datum'...
[2024-11-20T16:17:39+01:00 Cleaner]: Found line
[2024-11-20T16:17:39+01:00 Cleaner]: Perform cleanup in one line, result in baredata_baredata_smhi-opendata_1_52230_20210906_212532.csv
[2024-11-20T16:17:39+01:00 Filter]: Begin filtering...
[2024-11-20T16:17:39+01:00 Filter]: Filtering on only measurements taken at exactly 13:00:00, writing to onlyat13_filtered_baredata_smhi-opendata_1_52230_20210906_212532.csv
[2024-11-20T16:17:39+01:00 Filter]: Filtering on only measurements taken in April, writing to
[2024-11-20T16:17:39+01:00 Filter]: Filtering on only negative temperatures, writing to onlynegative_filtered_baredata_smhi-opendata_1_52230_20210906_212532.csv
[2024-11-20T16:17:39+01:00 Filter]: Filtering on only the data from 1960 to 2020, writing to from1960to2020_filtered_baredata_smhi-opendata_1_52230_20210906_212532.csv
87615
245868
new STARTLINE is: 158253

I am not sure why you print out those 3 lines but ok.

The resulting filter works.

Takumi0104 commented 1 day ago

I want to express the importance of line 169. Last time, I misunderstood the line numbers that the syntax of the tail is expressed by tail -n [filename]. The 'n' in 'tail -n' means the number of rows where the last data is located. So, defining the variable "STARTLINE " in line 163 doesn't make sense. I found a good solution and expressed it in line 169. >

I completely forgot to add to a smhicleaner.sh. I'll make sure to add it as soon as possible.

From now on, I'll tackle Task 5 and make sure to add all files and data. Thank you!