shell script remove files with extension code example
Example 1: bash delete all files of type recursively
# print all files recursively with exstension .bak
find . -name "*.bak" -type f
# add -delete command at the end to delete them
find . -name "*.bak" -type f -delete
Example 2: Remove file extension from file within dir Ask Question
import os
os.path.splitext(current)[0]