diff --git a/santiago.sh b/santiago.sh index 749c390..4caa8eb 100644 --- a/santiago.sh +++ b/santiago.sh @@ -31,7 +31,7 @@ function run { walkerDate=$(toot thread "$not" --no-color | head -2 | tail -1 | cut -d "@" -f 2,3 | rev | cut -d " " -f 1,2,3 | rev | sed "s/ //g") walkerFile=$(echo "$scriptDir/walkers/$walkerName") walkerKm=$(toot thread "$not" --no-color | grep -i "@caminosantiago aƱade " | grep -i "km" | head -1 | tr " " "_" | rev | cut -d "_" -f 1 | rev | tr '[:upper:]' '[:lower:]' | sed 's/km//g') - walkerKM=$(echo $walkerKM | sed 's/[^0-9]*//g') # Remove all non-numeric characters + walkerKm=$(echo $walkerKm | sed 's/[^0-9]*//g') # Remove all non-numeric characters if ! [[ $walkerKm =~ '^[0-9]+$' ]]; then if [ -f "$walkerFile" ]; then