[PATCH] scripts: coccicheck: Avoid warning about spurious escape

Peter Foley posted 1 patch 2 years, 8 months ago
scripts/coccicheck | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scripts: coccicheck: Avoid warning about spurious escape
Posted by Peter Foley 2 years, 8 months ago
e.g.
grep: warning: stray \ before -

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
---
 scripts/coccicheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index 2956fce8fa4f..fb492f032c5f 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -18,7 +18,7 @@ fi
 SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')
 
 USE_JOBS="no"
-$SPATCH --help | grep "\-\-jobs" > /dev/null && USE_JOBS="yes"
+$SPATCH --help | grep -e "--jobs" > /dev/null && USE_JOBS="yes"
 
 # The verbosity may be set by the environmental parameter V=
 # as for example with 'make V=1 coccicheck'

---
base-commit: d9fc1511728c15df49ff18e49a494d00f78b7cd4
change-id: 20230113-cocci-12936b2c06c3

Best regards,
-- 
Peter Foley <pefoley2@pefoley.com>
Re: [PATCH] scripts: coccicheck: Avoid warning about spurious escape
Posted by Julia Lawall 2 years, 6 months ago

On Fri, 13 Jan 2023, Peter Foley wrote:

> e.g.
> grep: warning: stray \ before -
>
> Signed-off-by: Peter Foley <pefoley2@pefoley.com>

Applied, thanks.

julia

> ---
>  scripts/coccicheck | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index 2956fce8fa4f..fb492f032c5f 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -18,7 +18,7 @@ fi
>  SPATCH_VERSION=$($SPATCH --version | head -1 | awk '{print $3}')
>
>  USE_JOBS="no"
> -$SPATCH --help | grep "\-\-jobs" > /dev/null && USE_JOBS="yes"
> +$SPATCH --help | grep -e "--jobs" > /dev/null && USE_JOBS="yes"
>
>  # The verbosity may be set by the environmental parameter V=
>  # as for example with 'make V=1 coccicheck'
>
> ---
> base-commit: d9fc1511728c15df49ff18e49a494d00f78b7cd4
> change-id: 20230113-cocci-12936b2c06c3
>
> Best regards,
> --
> Peter Foley <pefoley2@pefoley.com>
>