I’m trying to copy files from directory “dirA” to another directory “dirB”. In dirA I have a number of files which have same names but different extensions:
There aren’t always three files, sometimes there is only wav and gsm, sometimes there is only gsm and txt and so on, so the only constant I can rely on is the name “opt0000”.
Now, I’m trying to copy these files to dirB, however, the problem is that I need to be able to change the name from opt0000 to, for example, opt0020, so I can’t use “cp dirA/opt0000* dirB/.”.
Is there a command that can do something like this?