<div dir="ltr"><div><div><div>Hello Keith,<br><br></div>I'll give this a stab tonight. Talking with Jason confirms my suspicion that awk(1) might be a better fit here.<br><br></div>Cheers,<br></div>Kyle<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 13, 2015 at 3:31 PM, Keith Smiley <span dir="ltr"><<a href="mailto:keithbsmiley@gmail.com" target="_blank">keithbsmiley@gmail.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"><div><div style="font-size:12.8px">After installing surfraw on OS X either from source or from the [homebrew formula][1] retrieving the list of elvi with `surfraw -elvi` only outputs ` GLOBAL ELVI:`.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">After debugging this a little bit the problem is with this line:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">```</div><div style="font-size:12.8px">sed -n 's/^.*elvis:[ <span style="white-space:pre-wrap">     </span>]\+\(.*\)$/\1/p' $(find "$dir" ! -type d ! -type l ! -name '*~' | sort)</div><div style="font-size:12.8px">```</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">This pattern is incompatible with the version of BSD sed installed on OS X. To fix this the command would have to be:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>```</div><div>sed -n -E 's/^.*elvis:[ <span style="white-space:pre-wrap">   </span>]+(.*)$/\1/p' $(find "$dir" ! -type d ! -type l ! -name '*~' | sort)</div><div>```</div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Which I'm sure isn't compatible with other OS'. Any ideas how we can solve this and not break compatibility?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks!</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">[1]: <a href="https://github.com/Homebrew/homebrew/blob/master/Library/Formula/surfraw.rb" target="_blank">https://github.com/Homebrew/homebrew/blob/master/Library/Formula/surfraw.rb</a></div><div style="font-size:12.8px">Related: <a href="https://lists.alioth.debian.org/pipermail/surfraw-devel/2011-October/000968.html" target="_blank">https://lists.alioth.debian.org/pipermail/surfraw-devel/2011-October/000968.html</a></div><div style="font-size:12.8px"><br></div></div><br clear="all"><div><div><div dir="ltr">--<br>Keith Smiley</div></div></div>
</div>
<br>_______________________________________________<br>
Surfraw-devel mailing list<br>
<a href="mailto:Surfraw-devel@lists.alioth.debian.org">Surfraw-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/surfraw-devel" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/surfraw-devel</a><br></blockquote></div><br></div>