To place contents in a file (not claiming this is the most efficient way but it works)
OCRTHISFILE="ocr-test.jpg"
shortcuts run ocr-text -i "${OCRTHISFILE}"
pbpaste > ${OCRTHISFILE}.txt
or to view output and place in file:
OCRTHISFILE="ocr-test.jpg"
shortcuts run ocr-text -i "${OCRTHISFILE}"
pbpaste | tee ${OCRTHISFILE}.txt