Closed bauzer714 closed 2 years ago
The grep is returning multiple results, we can resolve this with head -1
head -1
Quick Proof:
NetTimeout=30 echo "Old" SPUSRelHtm=$(curl -m $NetTimeout -L -s https://github.com/michealespinola/syno.plexupdate/releases/latest) SPUSGtDate=$(echo $SPUSRelHtm | grep -oP 'relative-time datetime="\K[^"]+') SPUSRlDate=$(date --date "$SPUSGtDate" +'%s') echo $SPUSGtDate echo $SPUSRlDate echo "New" SPUSGtDate=$(echo $SPUSRelHtm | grep -oP 'relative-time datetime="\K[^"]+' | head -1) SPUSRlDate=$(date --date "$SPUSGtDate" +'%s') echo $SPUSGtDate echo $SPUSRlDate
Output:
Resolves #26
The grep is returning multiple results, we can resolve this with
head -1
Quick Proof:
Output:
Resolves #26