There are multiple files in a directory that begin with prefix fgh, for example:
fgh
fghfilea fghfileb fghfilec
I want to rename a
#!/bin/sh #replace all files ended witn .f77 to .f90 in a directory for filename in *.f77 do #echo $filename #b= echo $filename | cut -d. -f1 #echo $b mv "${filename}" "${filename%.f77}.f90" done