Given that I intent to change files with extensive name of .md to .sh
$ ls
bath.md breakfast.md brush.md test.sh
I wrote it as
$ cat test.sh
#! /usr/local/bin/bash
for f in *
do
if $f endswith .md
replace $f.md with $f.sh
done
How could I get the script done?