> ## Content Index
> Fetch the complete content index at: https://new-blog.dougals.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# Shell features: List expansion
- URL: https://new-blog.dougals.me/shell-features-list-expansion/
- Published: 2026-01-11T16:29:07.000Z
- Updated: 2026-01-11T16:29:07.000Z
- Author: Dougie Richardson
- Tags: Linux, Fedora, Snippet, zsh, #Migrated-1789219936886, #wp, #wp-post, #Import 2026-09-12 13:32

I like list expansion:

```bash
# Create mutiple directories
mkdir -p {src,data,app/{mobile,web}}
```

The `p` switch creates any "missing" parent directories and is idempotent (so if app exists it doesn't complain and if not creates it).

```bash
# Create multiple files
touch file_{1..5}.txt
```

Heck you can even combine it with tee!

```bash
# Create multiple Hello, World! files
echo "Hello, world\!" | tee file_{1..5}.txt
```

![](https://blog.dougals.me/wp-content/uploads/2026/01/image-7.png)