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
Copy file name to clipboardExpand all lines: etcdctl/README.md
+21
Original file line number
Diff line number
Diff line change
@@ -329,6 +329,27 @@ put key2 "some extra key"
329
329
# OK
330
330
```
331
331
332
+
#### Remarks
333
+
334
+
When using multi-line values within a TXN command, newlines must be represented as `\n`. Literal newlines will cause parsing failures. This differs from other commands (such as PUT) where the shell will convert literal newlines for us. For example:
335
+
336
+
```bash
337
+
./etcdctl txn <<<'mod("key1") > "0"
338
+
339
+
put key1 "overwrote-key1"
340
+
341
+
put key1 "created-key1"
342
+
put key2 "this is\na multi-line\nvalue"
343
+
344
+
'
345
+
346
+
# FAILURE
347
+
348
+
# OK
349
+
350
+
# OK
351
+
```
352
+
332
353
### COMPACTION [options]\<revision\>
333
354
334
355
COMPACTION discards all etcd event history prior to a given revision. Since etcd uses a multiversion concurrency control
0 commit comments