When scripting something that uses input files and output other files with a different extension we often want to keep the filename and change only the extension. To accomplish this SED can be used as described:
echo test.txt.264 | sed 's/\.[^.]*$//'
This replaces any characters after the last dot of the filename.
No comments:
Post a Comment