I am trying the following script:
#!/bin/bash
printf "Hello, this is a demo of brace expansion\n"
echo "Hello to each one of t{i,a,o}k"
output:
$ ./hello.sh
Hello, this is a demo of brace expansion
Hello to each one of t{i,a,o}k
why?
using
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
Double quotes suppress brace expansion:
You can quote the rest of your expression. Possibly usefully, if you quote the space before the brace part it stops wordsplitting, so you get something like: