Update changeidenfication.sh

This commit is contained in:
Alexandre
2024-05-02 19:04:03 +02:00
committed by GitHub
parent 334d998e85
commit 82640bc089

View File

@@ -27,6 +27,8 @@ NEWNAME_sciname="${NEWNAME%%_*}"
# Get the line where the column "File_Name" matches exactly $OLDNAME
IFS='|' read -r OLDNAME_sciname OLDNAME_comname OLDNAME_date < <(sqlite3 "$DB_FILE" "SELECT Sci_Name, Com_Name, Date FROM $DETECTIONS_TABLE WHERE File_Name = '$OLDNAME';")
echo "This script will change the identification $OLDNAME from $OLDNAME_comname to $NEWNAME_comname"
if [[ -z "$OLDNAME_sciname" ]]; then
echo "Error: No line matching $OLDNAME in $DB_FILE"
exit 1