18.3.10

Removing file extensions under linux

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.

TO BE COMPLETED

No comments: