Help for this page

Select Code to Download


  1. or download this
    sub expand_path ($$$\$) {
        # inputs: (product,version,is_32bit(T/F), ptr(expanded_path))
    ...
        $$expp = $rpm;
        return 0;
    }
    
  2. 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
    
  3. or download this
    echo gcc-+([^-])-+([^-]).rpm
    
  4. 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
    
  5. 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
    
  6. or download this
    #!/usr/bin/perl
    $pat='+([^-])-+([^-]).rpm';
    $a=`bash -c "shopt -s extglob ;echo gcc-$pat"`;
    print "a=$a\n";
    
  7. or download this
    bash: -c: line 0: syntax error near unexpected token `('
    bash: -c: line 0: `shopt -s extglob ;echo gcc-+([^-])-+([^-]).rpm'
    a=
    
  8. or download this
    (double backslash in front of parens:)
    
    ...
    $pat='+\\([^-]\\)-+\\([^-]\\).rpm';
    $a=`bash -c 'shopt -s extglob ;echo gcc-$pat'`;
    print "a=$a\n";
    
  9. or download this
    a=gcc-+([^-])-+([^-]).rpm