Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1

    picoreplayer grep version issues

    I'm running some additional scripts on my picoreplayer instances to pull data from some bluetooth based sensors. This script requires pcre support in grep.

    My older picoreplayer 7.0 systems still work as they currently have grep 3.1

    Code:
    tc@bluesqueeze:~$ grep --version
    grep (GNU grep) 3.1
    Copyright (C) 2017 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
    tc@bluesqueeze:~$ grep -oP 'value: \K.*'
    On my recently upgraded instance I tried installing grep from extensions and it now lacks pcre support
    Code:
    tc@Homeoffice:~$ grep --version
    grep (GNU grep) 3.4
    Copyright (C) 2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Written by Mike Haertel and others; see
    <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
    tc@Homeoffice:~$ grep -oP 'value: \K.*'
    grep: Perl matching not supported in a --disable-perl-regexp build
    Has anyone else hit this issue, and do you have a recommended fix as I'd like to upgrade my pizero environment to version 8.0.

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,919
    The grep on my pCP 8 is the default BusyBox version - and it does have a regex mechanism.
    Can you modify your search to use that instead?

    Code:
    BusyBox v1.33.0 (2021-03-13 12:32:47 EST) multi-call binary.
    
    Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
    Maybe a grep binary from a regular Raspbian/Raspberry Pi OS would work.

    Otherwise, I expect the easiest solution would be for the pCP team to rebuild the grep extension with the option enabled.
    Last edited by Paul Webster; 2021-10-07 at 02:05.
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

  3. #3
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    grep is built into busybox, but you can always add the full version of grep through a separate extension.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,919
    Quote Originally Posted by paul- View Post
    grep is built into busybox, but you can always add the full version of grep through a separate extension.
    That is what OP has done
    "On my recently upgraded instance I tried installing grep from extensions and it now lacks pcre support"
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

  5. #5
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    I skimmed too much. I get that extension from the piCore repo, so we would have to raise an issue over there.

    Why not just use standard regex support.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  6. #6
    Quote Originally Posted by paul- View Post
    I skimmed too much. I get that extension from the piCore repo, so we would have to raise an issue over there.

    Why not just use standard regex support.
    I'm using a third party script "mijia_mqtt.sh" to read my temp/humidity sensors. I'll need to take a look at the code structure.

  7. #7
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    Iĺll make a request to get Grep updated.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #8
    Here are the details for the script i'm using

  9. #9
    Quote Originally Posted by paul- View Post
    Iĺll make a request to get Grep updated.
    Thanks. Looks like I can resolve the issue by using sed instead of grep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •