Profile

Cover photo
Matt Bowcock
Works at Acushnet Company
Attended University of Massachusetts
Lived in Fairhaven, ma
2,495 followers|13,421 views
AboutPosts

Stream

Matt Bowcock

Shared publicly  - 
 
Figured I'd post this to public. Maybe get some help.
 
Hi All -
I'm having an issue with brace expansion in bash on Mac osx.

This works correctly -
> echo {1..4}
1 2 3 4

If I do the same with strings I get two values -
> echo {one, two}

Gives me
"{one" and "two}"

So if I were to try and create two directories using -
> mkdir ./{testOne, testTwo}

I'll get these two directories -
./{testOne
./testTwo}

Any ideas? Thanks. 
1
Add a comment...

Matt Bowcock

Shared publicly  - 
 
 
Sigh.
1
Mike Pepin's profile photo
 
Only the most prestigious schools offer CS courses in these elite fields!
Add a comment...

Matt Bowcock

Shared publicly  - 
1
Add a comment...

Matt Bowcock

Shared publicly  - 
1
Add a comment...

Matt Bowcock

Shared publicly  - 
1
Add a comment...
Have him in circles
2,495 people

Matt Bowcock

Advanced Topics  - 
 
Hi All -
I'm having an issue with brace expansion in bash on Mac osx.

This works correctly -
> echo {1..4}
1 2 3 4

If I do the same with strings I get two values -
> echo {one, two}

Gives me
"{one" and "two}"

So if I were to try and create two directories using -
> mkdir ./{testOne, testTwo}

I'll get these two directories -
./{testOne
./testTwo}

Any ideas? Thanks. 
1
1
Diego Rucci's profile photoJonathan Schultz's profile photoFrans OORT's profile photoAlain Narko's profile photo
6 comments
 
I could be off base but are you trying to work it like a sequence/int or a string/array?

As with debian/Ubuntu have sh symlinked to dash, are you certain your Mac is using bash?
Add a comment...

Matt Bowcock

Shared publicly  - 
 
New Hampshire
1
Add a comment...

Matt Bowcock

Shared publicly  - 
1
Add a comment...
People
Have him in circles
2,495 people
Work
Occupation
Software Developer
Employment
  • Acushnet Company
    Software Developer, 2004 - present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
Fairhaven, ma - New Bedford, ma - Honolulu, hi
Links
Other profiles
Story
Introduction
Software developer. I usually post about code, programming languages, math.

Work with python/c#, play with scheme, getting into clojure.

Education
  • University of Massachusetts
    Computer Engineering, 1999 - 2003
Basic Information
Gender
Male
Looking for
Friends, Networking
Relationship
Married