Facepalm, forgot to quote variables in commands. Wondered for 5 minutes why sqlite3 $DB_FILE <<EOF gave a "no such table" error.

Ah, nevermind, sorted. Had a little mix-up about implied BEGIN TRANSACTIONs.

(the last "fi" refers to the "if" 20 lines above)

Can anyone suggest why the below results in 'Error: near line 1: near "INSERT": syntax error'?

read -p "Other notes: " WINENOTESother_notes
if [[ -z "$WINENOTESother_notes" ]]; then
WINENOTESothernotes=null
fi
sqlite3 $DB
FILE << EOF
BEGIN TRANSACTION
INSERT INTO wines VALUES (null, '$WINEdate', '$WINEformat', '$WINEtype', '$WINEvineyard', '$WINEyear', '$WINEregion', '$WINEname', '$WINEgrape1', '$WINEgrape2', '$WINEgrape3')
INSERT INTO winenotes VALUES (null, LASTINSERT_ROWID(), '$WINENOTESnotes_date', '$WINENOTESnose', '$WINENOTEStaste', '$WINENOTESratingof10', '$WINENOTESrating_justification', '$WINENOTESother_notes')
COMMIT TRANSACTION;
EOF
fi

Hope you both feel better soon. A generous pour of some spirit to stop the coughing…

// @kdfrawg

Would love to see what you've been working on.

@kdfrawg I did that in Paris. Here, the apartment came 100% LED.

CFL makes me very uncomfortable, especially if it's not indirect.

//

Ouch. I find a salt water gargle helps.

Huh! There is a Krispy Kreme in Edinburgh. 2, in fact. The closest one is 10km away.

Well, they are calorific. Might be worth a bike ride there.

Loved Krispy Kreme (until they stopped operating in HK completely), though I never tasted their coffee.

//