Sponsored By

Sign in to follow this  
shanenin

Odd Bash Behavior

Recommended Posts

I was just messing around with bash, and noticed what seemed to be odd behavior

[email protected] ~ $ echo {a,d}oo
aoo doo
[email protected] ~ $ echo {a,}oo
aoo oo
[email protected] ~ $ echo {,a}oo
oo aoo
[email protected] ~ $ ¬†echo {a}oo
{a}oo

I guess I would have thought `echo {a}oo` would have produced aoo

Edited by shanenin

Share this post


Link to post
Share on other sites

this is from man bash

A correctly-formed brace expansion must contain unquoted opening and closing braces, and at least one unquoted comma or a valid sequence expression.

it still seems unlogical(in my mind) :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this