Complete the code to print the current directory path.
echo [1]The pwd command prints the current directory path in Bash.
Complete the code to create a new directory named 'backup'.
[1] backupThe mkdir command creates a new directory in Bash.
Fix the error in the script to list all files including hidden ones.
ls [1]The -a option with ls shows all files, including hidden ones starting with a dot.
Fill both blanks to create a loop that prints numbers 1 to 5.
for i in [1]; do echo $[2] done
The loop iterates over the list '1 2 3 4 5' and prints each number stored in variable i.
Fill all three blanks to create a script that checks if a file exists and prints a message.
if [[ -[1] [2] ]]; then echo "File [3] exist." else echo "File does not exist." fi
The -e option checks if the file exists. The filename is 'myfile.txt'. The message uses 'does' to say the file exists.
