bash: -c: line 0: syntax error near unexpected token `('
As I noted in my reply to your other node, you have to use \n instead of the semicolon to separate the shopt -s extglob statement from the rest, i.e.
#!/usr/bin/perl $pat='+([^-])-+([^-]).rpm'; $a=`bash -c "shopt -s extglob\necho gcc-$pat"`; print "a=$a\n";
In reply to Re: quoting problems passing pattern to shell in backquotes
by almut
in thread quoting problems passing pattern to shell in backquotes
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |