"Ken Failbus" <[EMAIL PROTECTED]> writes: > bash -x /tmp/mydummy > + shopt -s extglob > + rm -f '/tmp/file.+([0-9])' > + exit 0 > > But if "bash -n" is run it doesn't understands +([0-9}) > bash -n /tmp/mydummy > /tmp/mydummy: line 3: syntax error near unexpected token `/tmp/file.+([' > /tmp/mydummy: line 3: `rm -f /tmp/file.+([0-9])' > > Can you provide insight into this.
shopt changes the shell grammar. When it's not executed the modified grammar is not accepted. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."