> 3) (sed m expr) > > This will print out on std output all lines not matched by m, if m is > matched then that expr will make sure to print the correct way > > An example matcher is > m := (s-tr a b) > > which will replace a by b
FWIW Guix has a sed-like macro, called ‘substitute*’ [0]. Example:
(substitute* "my-file.txt"
(("^(.*) world$" _ first-word)
(string-append "Hello (was: " first-word ") world\n")))
Ludo’.
[0] http://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/utils.scm#n387
