From 31644a91ccc90f94141794c576981dfcfc0ab8c7 Mon Sep 17 00:00:00 2001 From: koalaman Date: Tue, 25 Feb 2014 17:19:54 -0800 Subject: [PATCH] Updated SC2033 (markdown) --- SC2033.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SC2033.md b/SC2033.md index fd881ec..2ab0fc1 100644 --- a/SC2033.md +++ b/SC2033.md @@ -2,12 +2,12 @@ ### Problematic code: - foo() { rm /run/foo; bar --baz; }; - sudo foo + foo() { bar --baz "$@"; frob --baz "$@"; }; + find . -print0 | xargs -0 foo ### Correct code: - sudo sh -c 'rm /run/foo; bar --baz;' + find . -print0 | xargs -0 sh -c 'bar --baz "$@"; frob --baz "$@";' -- ### Rationale: