bash extract file name - 03-17-22

Comparing the following shows how to use basename to extract just the file name from a full path.

$ for file in ./content/**/*.md ; do echo $file ; done | head -10
./content/_index.de.md
./content/_index.en.md
./content/_index.ru.md
./content/blog/_index.de.md
./content/blog/_index.en.md
./content/blog/ahrn-valley/index.en.md
./content/blog/archiving-corona-cal/index.en.md
./content/blog/arco/index.de.md
./content/blog/arco/index.en.md
./content/blog/armycookbot/index.de.md


$ for file in ./content/**/*.md ; do file=$(basename $file) && echo $file ; done
_index.de.md
_index.en.md
_index.ru.md
_index.de.md
_index.en.md
index.en.md
index.en.md
index.de.md
index.en.md
index.de.md
\- [ sh, bash ]