Reputation: 761
line 852: syntax error near unexpected token `('
Line 852 is the last line of a function:
touch --reference="$KERNEL_FILE" "$moduledest"/modules.(*.bin|devname|softdep)
When inserting the exclamation mark !
before (
:
touch --reference="$KERNEL_FILE" "$moduledest"/modules.!(*.bin|devname|softdep)
touch
the inverse of !(*.bin|devname|softdep)
?/modules.alias.bin
/modules.builtin.bin
/modules.dep.bin
/modules.devname
/modules.softdep
/modules.symbols.bin
Upvotes: 3
Views: 86
Reputation: 761
The pattern you are trying to negate match with the exclamation mark is an "extended glob". Enabled somewhere in the script with a command alike shopt -s extglob
.
The negation form with extended globbing syntax is defined as !(list)
:
!(list)
Matches anything but the given patterns.
The inverse of that negative match in this case is the syntaxis @(list)
:
@(list)
Matches one of the given patterns
Upvotes: 3