Page 1 of 1

(e)grep warnings

Posted: Fri Sep 27, 2024 2:12 pm
by nikiwaibel
just a minor cosmetic thing:

Code: Select all

make[1]: Entering directory 'src'
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #
egrep: warning: egrep is obsolescent; using grep -E
grep: warning: stray \ before #

* it seems using [font=monospace]egrep[/font] is depreciated and [font=monospace]grep -E[/font] should be used instead. egrep is used quite often:

Code: Select all

$ grep -r egrep external/ChibiOS/* | wc
    112    1257   17896

* the other warning is about an unnecessary backslash before a hash. i used to see sthg like this

Code: Select all

egrep -e "\#define"

Re: (e)grep warnings

Posted: Mon Oct 14, 2024 12:19 pm
by Giovanni
Hi,

I am not seeing any warning on Linux Mint or in Windows GNU utils from MinGW, replaced egrep anyway.

The \ fixes a syntax highlighting issue in Eclipse for makefiles, without that all the text is gray after the #.

Giovanni

Re: (e)grep warnings

Posted: Wed Oct 16, 2024 11:32 pm
by nikiwaibel
i am using Fedora 40, which comes with

Code: Select all

$ grep --version
grep (GNU grep) 3.11
Copyright (C) 2023 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.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>.

grep -P uses PCRE2 10.44 2024-06-07
$ which grep
alias grep='grep --color=auto'
   /usr/bin/grep
$ rpm -qf /usr/bin/grep
grep-3.11-7.fc40.x86_64


[font=monospace]egrep[/font] is still used in quite some [font=monospace]platform*.mk[/font] files and the update_*conf*.sh scripts:

Code: Select all

$ grep -c -r egrep * | grep -v :0$
os/hal/ports/ADUCM/ADUCM36x/platform.mk:1
os/hal/ports/MAX32/MAX32625/platform.mk:1
os/hal/ports/RP/RP2040/platform.mk:1
os/hal/ports/STM32/STM32C0xx/platform.mk:1
os/hal/ports/STM32/STM32F0xx/platform.mk:1
os/hal/ports/STM32/STM32F1xx/platform.mk:1
os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk:1
os/hal/ports/STM32/STM32F37x/platform.mk:1
os/hal/ports/STM32/STM32F3xx/platform.mk:1
os/hal/ports/STM32/STM32F4xx/platform.mk:1
os/hal/ports/STM32/STM32F7xx/platform.mk:1
os/hal/ports/STM32/STM32G0xx/platform.mk:1
os/hal/ports/STM32/STM32G4xx/platform.mk:1
os/hal/ports/STM32/STM32H5xx/platform.mk:1
os/hal/ports/STM32/STM32H7xx/platform.mk:1
os/hal/ports/STM32/STM32H7xx/platform_type2.mk:1
os/hal/ports/STM32/STM32L0xx/platform.mk:1
os/hal/ports/STM32/STM32L1xx/platform.mk:1
os/hal/ports/STM32/STM32L4xx/platform_l412_l422.mk:1
os/hal/ports/STM32/STM32L4xx/platform_l432.mk:1
os/hal/ports/STM32/STM32L4xx/platform.mk:1
os/hal/ports/STM32/STM32L4xx+/platform.mk:1
os/hal/ports/STM32/STM32L4xx+/platform_l4p5_l4q5.mk:1
os/hal/ports/STM32/STM32L5xx/platform.mk:1
os/hal/ports/STM32/STM32MP1xx/platform.mk:1
os/hal/ports/STM32/STM32U5xx/platform.mk:1
os/hal/ports/STM32/STM32WBxx/platform.mk:1
os/hal/ports/STM32/STM32WLxx/platform.mk:1
os/hal/ports/STM32/STM32WLxx/platform_v2.mk:1
os/hal/ports/sandbox/platform.mk:1
os/hal/templates/platform.mk:1
os/xhal/ports/STM32/STM32G4xx/platform.mk:1
os/xhal/ports/vio/platform.mk:1
tools/updater/update_chconf_nil.sh:2
tools/updater/update_halconf.sh:2
tools/updater/update_chconf_rt.sh:2
tools/updater/update_mcuconf_stm32f401xx.sh:2
tools/updater/update_mcuconf_stm32f303xx.sh:2
tools/updater/update_mcuconf_stm32f407xx.sh:2
tools/updater/update_mcuconf_stm32f413xx.sh:2
tools/updater/update_mcuconf_stm32c0x1xx.sh:2
tools/updater/update_mcuconf_stm32f410xx.sh:2
tools/updater/update_mcuconf_stm32f427xx.sh:2
tools/updater/update_mcuconf_stm32f72xxx.sh:2
tools/updater/update_mcuconf_stm32g071xx.sh:2
tools/updater/update_mcuconf_stm32f412xx.sh:2
tools/updater/update_mcuconf_stm32f411xx.sh:2
tools/updater/update_mcuconf_stm32f446xx.sh:2
tools/updater/update_mcuconf_stm32f469xx.sh:2
tools/updater/update_mcuconf_stm32f746xx.sh:2
tools/updater/update_mcuconf_stm32f76xxx.sh:2
tools/updater/update_mcuconf_stm32h563xx.sh:2
tools/updater/update_mcuconf_stm32g031xx.sh:2
tools/updater/update_mcuconf_stm32l05xxx.sh:2
tools/updater/update_mcuconf_stm32g4x4xx.sh:2
tools/updater/update_mcuconf_stm32g0b1xx.sh:2
tools/updater/update_mcuconf_stm32l452xx.sh:2
tools/updater/update_mcuconf_stm32g4x1xx.sh:2
tools/updater/update_mcuconf_stm32h743xx.sh:2
tools/updater/update_mcuconf_stm32h723xx.sh:2
tools/updater/update_mcuconf_stm32h7a3xx.sh:2
tools/updater/update_mcuconf_stm32l07xxx.sh:2
tools/updater/update_mcuconf_stm32l476xx.sh:2
tools/updater/update_mcuconf_stm32l432xx.sh:2
tools/updater/update_mcuconf_stm32wb55xx.sh:2
tools/updater/update_mcuconf_stm32l5x2xx.sh:2
tools/updater/update_mcuconf_stm32l4rxxx.sh:2
tools/updater/update_mcuconf_stm32l422xx.sh:2
tools/updater/update_mcuconf_stm32l496xx.sh:2
tools/updater/update_mcuconf_stm32wlxx.sh:2
$

Re: (e)grep warnings

Posted: Fri Oct 18, 2024 7:20 am
by Giovanni
It is the same version here, strange, maybe it is affected by some env var.

Code: Select all

giovanni@Freya:~$ grep --version
grep (GNU grep) 3.11
Copyright (C) 2023 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.savannah.gnu.org/cgit/grep.git/tree/AUTHORS>.

grep -P uses PCRE2 10.42 2022-12-11
giovanni@Freya:~$ which grep
/usr/bin/grep


Giovanni

Re: (e)grep warnings

Posted: Tue Jul 01, 2025 10:00 am
by Giovanni
Closing, fixed a while ago.

Giovanni