This is called a Bracket Extension , which expands to a list of space-separated lines.
So touch {a,b,c} will be equivalent
touch abc
So far, touch {a,b,c}x will be equivalent:
touch ax bx cx
The pear command will execute as:
pear channel-discover pear.phpunit.de pear.symfony-project.com
which may not be what you expected. If you want the command to run once for each line, use a for loop (which answers your second question) or use a combination of parenthesis extension and xargs.
Shawn chin
source share