Introduction
Brace expansion helps you quickly create a list of numbers or strings without typing each one. It saves time and reduces mistakes.
echo {start..end}
# Example: echo {1..10}echo {1..5}echo file{1..3}.txtmkdir folder{1..4}for i in {1..3}; do echo "Number $i"; done
#!/bin/bash # Print numbers from 1 to 10 for num in {1..10}; do echo "Number: $num" done
{1..5} produce when used in a command?{start..end} generates a sequence of numbers or letters from start to end.{1..5} produces the numbers 1, 2, 3, 4, 5 separated by spaces.{start..end}.echo {3..7} uses correct braces and dots. Others use wrong symbols like parentheses, brackets, or hyphens.echo file{1..3}.txt{1..3} generates 1 2 3, and the suffix .txt is added to each.echo {1..5..2}{start..end..step} is valid in Bash to generate sequences with a step.log1.txt through log10.txt using a single Bash command with brace expansion. Which command achieves this?touch log{1..10}.txt, which expands to log1.txt, log2.txt, ..., log10.txt.touch log{1..10} omits the .txt suffix; touch log{1..10.txt} has invalid syntax with .txt inside braces; touch log{1..10}.txt.txt adds an extra .txt to each filename.Pass the test and this pattern moves unknown