[Surfraw-devel] OS X sed incompatibility

Keith Smiley keithbsmiley at gmail.com
Mon Sep 14 00:33:56 UTC 2015


Awesome thanks! Let me know if I can help with anything/testing.

--
Keith Smiley

On Sun, Sep 13, 2015 at 4:28 PM, Kyle Isom <coder at kyleisom.net> wrote:

> Hello Keith,
>
> I'll give this a stab tonight. Talking with Jason confirms my suspicion
> that awk(1) might be a better fit here.
>
> Cheers,
> Kyle
>
> On Sun, Sep 13, 2015 at 3:31 PM, Keith Smiley <keithbsmiley at gmail.com>
> wrote:
>
>> 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:`.
>>
>> After debugging this a little bit the problem is with this line:
>>
>> ```
>> sed -n 's/^.*elvis:[  ]\+\(.*\)$/\1/p' $(find "$dir" ! -type d ! -type l
>> ! -name '*~' | sort)
>> ```
>>
>> This pattern is incompatible with the version of BSD sed installed on OS
>> X. To fix this the command would have to be:
>>
>> ```
>> sed -n -E 's/^.*elvis:[  ]+(.*)$/\1/p' $(find "$dir" ! -type d ! -type l
>> ! -name '*~' | sort)
>> ```
>>
>> Which I'm sure isn't compatible with other OS'. Any ideas how we can
>> solve this and not break compatibility?
>>
>>
>> Thanks!
>>
>>
>> [1]:
>> https://github.com/Homebrew/homebrew/blob/master/Library/Formula/surfraw.rb
>> Related:
>> https://lists.alioth.debian.org/pipermail/surfraw-devel/2011-October/000968.html
>>
>>
>> --
>> Keith Smiley
>>
>> _______________________________________________
>> Surfraw-devel mailing list
>> Surfraw-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/surfraw-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20150913/bdce02b9/attachment.html>


More information about the Surfraw-devel mailing list