all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 2f8bcb0894ff012b510edd414bea96632a41b576 848 bytes (raw)
name: testing/examples/ob-sed-test.org 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
#+PROPERTY: results silent scalar
#+Title: a collection of examples for ob-sed tests

* Test simple execution of sed script
  :PROPERTIES:
  :ID:       C7E7CA6A-2601-42C9-B534-4102D62E458D
  :END:

  #+NAME: ex1
  #+BEGIN_EXAMPLE
    An example sentence.
  #+END_EXAMPLE

  #+BEGIN_SRC sed :stdin ex1
    s/n example/ processed/
    2 d
  #+END_SRC

* Test :in-file header argument
  :PROPERTIES:
  :ID:       54EC49AA-FE9F-4D58-812E-00FC87FAF562
  :END:

  #+BEGIN_SRC sed :in-file test1.txt
  s/test/tested/
  #+END_SRC

* Test :cmd-line header argument
  :PROPERTIES:
  :ID:       E3C6A8BA-39FF-4840-BA8E-90D5C4365AB1
  :END:

  /Note:/ Use =-i.backup= instead of just =-i= because the BSD =sed=,
  unlike the GNU =sed=, requires =-i <extension>=.

  #+BEGIN_SRC sed :in-file test2.txt :cmd-line "-i.backup"
    s/test/tested again/
  #+END_SRC

debug log:

solving 2f8bcb089 ...
found 2f8bcb089 in https://git.savannah.gnu.org/cgit/emacs.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.