- or download this
sub expand_path ($$$\$) {
# inputs: (product,version,is_32bit(T/F), ptr(expanded_path))
...
$$expp = $rpm;
return 0;
}
- or download this
If the *extglob* shell option is enabled using the *shopt* builtin, se
+veral
extended pattern matching operators are recognized. In the followin
+g
...
Matches one of the given patterns
!(pattern-list)
Matches anything except one of the given patterns
- or download this
echo gcc-+([^-])-+([^-]).rpm
- or download this
gcc-32bit-4.2-24.x86_64.rpm
gcc-4.2-24.x86_64.rpm
...
gcc42-objc-32bit-4.2.1_20070724-17.x86_64.rpm
gcc42-objc-4.2.1_20070724-17.x86_64.rpm
gcc42-testresults-4.2.1_20070724-26.x86_64.rpm
- or download this
gcc-32bit-4.2-24.x86_64.rpm
gcc-4.2-24.x86_64.rpm
...
gcc-obj-c++-4.2-24.x86_64.rpm
gcc-objc-32bit-4.2-24.x86_64.rpm
gcc-objc-4.2-24.x86_64.rpm
- or download this
#!/usr/bin/perl
$pat='+([^-])-+([^-]).rpm';
$a=`bash -c "shopt -s extglob ;echo gcc-$pat"`;
print "a=$a\n";
- or download this
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `shopt -s extglob ;echo gcc-+([^-])-+([^-]).rpm'
a=
- or download this
(double backslash in front of parens:)
...
$pat='+\\([^-]\\)-+\\([^-]\\).rpm';
$a=`bash -c 'shopt -s extglob ;echo gcc-$pat'`;
print "a=$a\n";
- or download this
a=gcc-+([^-])-+([^-]).rpm