Bash Scripting - String Operations
You have a list of filenames:
You want to remove the '.csv' suffix only from files that end with '.csv' using Bash parameter expansion. Which command correctly prints the filenames with '.csv' removed where applicable?
files=("data1.csv" "data2.csv" "notes.txt" "summary.csv")You want to remove the '.csv' suffix only from files that end with '.csv' using Bash parameter expansion. Which command correctly prints the filenames with '.csv' removed where applicable?
