<div dir="ltr"><div>Hi Michael,</div><div><br></div><div><br></div><div>You can use Simplelines.lns for that.</div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Raphaël<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 25, 2018 at 7:15 PM, Michael Boldi <span dir="ltr"><<a href="mailto:mboldi@uptycs.com" target="_blank">mboldi@uptycs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I was hoping to find a lens for a generic file like   /etc/motd  ..</div><div>I need to look for certain illegal strings as well as verify some strings exist.</div><div><br></div><div>I would imagine the key is line# and value would be the entire line ..</div><div>I guess the lack of keys in the motd may prohibit this ?</div><div><br></div><div>I wrote a simple ( lens creator newbie )   lens to do this ..</div><div>Is this 2request worth submitting ?  Or can we introduce my simple lens into the library ?</div><div> </div><div>Here ..</div><div><br></div><div><div>module Motd =</div><div>  autoload xfm</div><div><br></div><div>let word = /[^# \n\t\/]+/</div><div><br></div><div>let sto_line = store /[^# \t\n].*$/</div><div><br></div><div>let record = [ key word . (Util.del_ws_tab . sto_line)? . Util.eol ]</div><div><br></div><div>let lns = ( Util.empty | Util.comment | record ) *</div><div>let filter = (</div><div>   incl "/etc/motd" .</div><div>   incl "/etc/issue" .</div><div>   incl "/etc/<a href="http://issue.net" target="_blank">issue.net</a>" )</div><div>let xfm = transform lns filter</div></div><div><br></div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
augeas-devel mailing list<br>
<a href="mailto:augeas-devel@redhat.com">augeas-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/augeas-devel" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/augeas-devel</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span style="font-size:small">Raphaël Pinson</span><div style="font-size:small">Infrastructure Developer & Training Leader</div><div><font size="2">+33 458 482 013</font><div style="font-size:small"><br></div><div style="font-size:small">Camptocamp France SAS</div><div><div><font size="2">Bâtiment le Dauphin - 1er étage</font></div></div><div style="font-size:small">18 rue du Lac Saint André</div><div style="font-size:small">Savoie Technolac</div><div style="font-size:small">F-73370 Le Bourget du Lac</div><div style="font-size:small"><br></div><div style="font-size:small"><a href="http://www.camptocamp.com/" style="color:rgb(17,85,204)" target="_blank">www.camptocamp.com</a></div></div>
</div></div></div></div></div></div></div></div></div></div>
</div>