From f6c3896087a364e7cabe791640a50c675fc9ca4a Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 6 Nov 2012 22:49:49 +0000 Subject: init.d/bootmisc: POSIX XSI shellism. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a pathname expansion, specifically single-character match, the pure POSIX specification uses '!' as the Negation character where a regular expression would normally be '^'. Regular expression: "a[^a]a" Pathname expansion pattern: "a[!a]a" Reference: IEEE Std 1003.1, 2004 Edition 2. Shell Command Language 2.13 Pattern Matching Notation 2.13.1 Patterns Matching a Single Character > The description of basic regular expression bracket expressions in the > Base Definitions volume of IEEEĀ StdĀ 1003.1-2001, Section 9.3.5, RE > Bracket Expression shall also apply to the pattern bracket expression, > except that the exclamation mark character ( '!' ) shall replace the > circumflex character ( '^' ) in its role in a "non-matching list" in > the regular expression notation. A bracket expression starting with an > unquoted circumflex character produces unspecified results. Signed-off-by: Robin H. Johnson --- init.d/bootmisc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index d8692700..695e4509 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -27,7 +27,7 @@ cleanup_tmp_dir() ebegin "Wiping $dir directory" # Faster than raw find - if ! rm -rf -- [^ajlq\.]* 2>/dev/null ; then + if ! rm -rf -- [!ajlq\.]* 2>/dev/null ; then # Blah, too many files find . -maxdepth 1 -name '[^ajlq\.]*' -exec rm -rf -- {} + fi -- cgit v1.2.3