Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GNU grep recently migrated to PCRE2. My GNU grep is linked to PCRE2:

    $ grep --version | head -n2
    grep (GNU grep) 3.8
    Copyright (C) 2022 Free Software Foundation, Inc.
    $ ldd /usr/bin/grep
            linux-vdso.so.1 (0x00007ffd2ddd5000)
            libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f4f88b81000)
            libc.so.6 => /usr/lib/libc.so.6 (0x00007f4f8899a000)
            /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f4f88c6f000)
As for pcre2grep, Archlinux includes it as part of the pcre2 package:

    $ pacman -Qo $(which pcre2grep)
    /usr/bin/pcre2grep is owned by pcre2 10.40-3
So this is a distro packaging thing. But what I said is true: pcregrep, pcre2grep and grep -P are all distinct things.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: