Looping in the current directory and checking if the file extension ends with yaml, then split the filename on dot and perform other operations. Below is my code.
What's wrong here? I'm getting error like: syntax error: unexpected "(" (expecting "done")
for fname in $(find . -name '*.yaml' -exec basename {} \;); do
echo "Printing filename $fname"
ARR=(${fname//./ })
echo "${ARR[0]}"
done