You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking that apart: the main trick here is to use `cat <<EOF ... EOF` to wrap the literal chunk of text:
33
+
```
34
+
$(cat <<EOF
35
+
insert into documents select
36
+
substr(s3_ocr_etag, 2, 8) as id,
37
+
key as title,
38
+
key as path,
39
+
replace(s3_ocr_etag, '"', '') as etag
40
+
from
41
+
index2.ocr_jobs;
42
+
EOF
43
+
)
44
+
```
45
+
Then to pass it as an argument to the `sqlite-utils` command use `"$(cat ...)"` - the double quotes around that ensure that tokens in that input are not treated as separate arguments by zsh/bash.
0 commit comments