I am working on a small code in bash, but I am stuck on a small problem.
I have a string, and I want to replace the last letter of that string with s.
For example: I am taking all the files that end in c and replacing the last c with s.
for file in *.c; do
# replace c with s
echo $file
Can someone please help me?