Linux Practice Test
Linux+ Bash Scripting and Automation Questions and Answers
A script has a variable defined as `FILENAME="report_final.docx"`.
Which parameter expansion command will correctly remove the file extension, resulting in `report_final`?
Select your answer
A
echo "${FILENAME#*.}"
B
echo "${FILENAME%%.*}"
C
echo "${FILENAME%.*}"
D
echo "${FILENAME/docx/}"
Hint