In a directory, I have about 150 files with a certain extension, for example:abc.extdef.extghi.ext...Now I want to copy all of these files also to a new filename (without extension):abcdefghiWhat is the shortest way to get this done? Is it possible without writing a loop in a bash file?Edit: Thank you for your answers (dirkt, John Newman).After seeing the answers I'll stick with the shorter one, although it has a loop.
copy files to a new name - shortest way
files;rename;file copy
It's possible without writing a script (bash file), but not without using a loop:for f in *.ext ; do cp -- $f $(basename $f .ext) ; donebasename can be used to remove the suffix.