some issues with file:contains-lines
Sean Whitton
spwhitton at spwhitton.name
Wed Dec 8 17:16:25 GMT 2021
Hello Andreas,
On Tue 07 Dec 2021 at 09:32PM GMT, Andreas Reuleaux wrote:
> i am discovering issues with file:contains-lines
>
> (1) when I follow the example as given in the introduction section of
> the docs https://spwhitton.name/doc/consfigurator/introduction.html#
>
> --8<---------------cut here---------------start------------->8---
> ...
> (file:contains-lines "/etc/some.conf" '("FOO=bar")) ; preserve rest of file contents
> ...
> --8<---------------cut here---------------end--------------->8---
>
> I get to see
>
> --8<---------------cut here---------------start------------->8---
> (FOO=bar)
> --8<---------------cut here---------------end--------------->8---
>
> in file /etc/some.conf - not really what I expected (the literal braces i.e.): I thought I would
> get to see just
>
> --8<---------------cut here---------------start------------->8---
> FOO=bar
> --8<---------------cut here---------------end--------------->8---
>
> in /etc/some.conf
This is because FILE:CONTAINS-LINES uses &REST for the LINES parameter.
I've fixed the example now -- thank you.
--
Sean Whitton
More information about the sgo-software-discuss
mailing list