for file in *.cpp #Will change every cpp file do mv $file $(echo $file | sed 's/Exercise/Ej/') #named "Exercise" will be "Ej" now done