diff mbox series

[v2,2/2] common/quota: fix grep pattern

Message ID 20220920031951.2098839-2-jencce.kernel@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] egrep, fgrep: deprecated | expand

Commit Message

Murphy Zhou Sept. 20, 2022, 3:19 a.m. UTC
The second dash is not needed now. Newer grep is complaining:
+grep: warning: stray \ before -

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
v1-->v2:
	Using -- option.

 common/quota | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang Sept. 20, 2022, 4:32 a.m. UTC | #1
On Tue, Sep 20, 2022 at 11:19:51AM +0800, Murphy Zhou wrote:
> The second dash is not needed now. Newer grep is complaining:
> +grep: warning: stray \ before -
> 
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
> ---
> v1-->v2:
> 	Using -- option.

Good to me,
Reviewed-by: Zorro Lang <zlang@redhat.com>

> 
>  common/quota | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/quota b/common/quota
> index 22be3c69..24251d09 100644
> --- a/common/quota
> +++ b/common/quota
> @@ -218,7 +218,7 @@ _qmount()
>          quotacheck -ug $SCRATCH_MNT >>$seqres.full 2>&1
>          quotaon -ug $SCRATCH_MNT >>$seqres.full 2>&1
>          # try to turn on project quota if it's supported
> -        if quotaon --help 2>&1 | grep -q '\-\-project'; then
> +        if quotaon --help 2>&1 | grep -q -- '--project'; then
>              quotaon --project $SCRATCH_MNT >>$seqres.full 2>&1
>          fi
>      fi
> -- 
> 2.31.1
>
diff mbox series

Patch

diff --git a/common/quota b/common/quota
index 22be3c69..24251d09 100644
--- a/common/quota
+++ b/common/quota
@@ -218,7 +218,7 @@  _qmount()
         quotacheck -ug $SCRATCH_MNT >>$seqres.full 2>&1
         quotaon -ug $SCRATCH_MNT >>$seqres.full 2>&1
         # try to turn on project quota if it's supported
-        if quotaon --help 2>&1 | grep -q '\-\-project'; then
+        if quotaon --help 2>&1 | grep -q -- '--project'; then
             quotaon --project $SCRATCH_MNT >>$seqres.full 2>&1
         fi
     fi