Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to print numbers from 1 to 10 using brace expansion.
Bash Scripting
echo [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets [] instead of curly braces.
Using parentheses () instead of curly braces.
Using angle brackets <> instead of curly braces.
✗ Incorrect
Brace expansion uses curly braces with two numbers separated by two dots to generate a sequence.
2fill in blank
mediumComplete the code to create files named file1 to file10 using brace expansion.
Bash Scripting
touch file[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets instead of curly braces.
Using parentheses instead of curly braces.
Using angle brackets instead of curly braces.
✗ Incorrect
Brace expansion with {1..10} generates numbers from 1 to 10 to create multiple files.
3fill in blank
hardFix the error in the code to print numbers 1 to 10 using brace expansion.
Bash Scripting
echo {1.[1]10} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a single dot instead of two dots.
Using three dots or a comma instead of two dots.
✗ Incorrect
Brace expansion requires two dots '..' between numbers to specify a range.
4fill in blank
hardFill both blanks to create a sequence of letters from a to j using brace expansion.
Bash Scripting
echo [1][2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets or parentheses instead of curly braces.
Adding extra characters after the brace expansion.
✗ Incorrect
Brace expansion with {a..j} generates letters from a to j. No extra characters needed after.
5fill in blank
hardFill the blank to create files named img01.jpg to img10.jpg using brace expansion.
Bash Scripting
touch img[1].jpg Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using {1..10} without leading zero padding.
Using incorrect brace expansion syntax.
Wrong file extension.
✗ Incorrect
Brace expansion with {01..10} generates padded numbers 01 to 10 to create img01.jpg to img10.jpg.