I have been running a program mseed2sac using the following command
cd IV
find . -type f -exec /swadmin/mseed2sac '{}' \;
The problem is that I end up with a lot of files in directory IV.
Instead I would like to select the designator HHZ, create a
directory IV.SAC and all the files output for mseed2sac
get stored there
The two directories IV and IV.SAC would be at the same level
IV.SAC
PTCC
HHZ.D
IV.PTCC..HHZ.D.2016.001.SAC
IV.PTCC..HHZ.D.2016.002.SAC
IV.PTCC..HHZ.D.2016.003.SAC
IV.PTCC..HHZ.D.2016.004.SAC
IV.PTCC..HHZ.D.2016.005.SAC
IV.PTCC..HHZ.D.2016.006.SAC
RAFF
HHZ.D
IV.RAFF..HHZ.D.2016.001.SAC
IV.RAFF..HHZ.D.2016.002.SAC
IV.RAFF..HHZ.D.2016.003.SAC
IV.RAFF..HHZ.D.2016.004.SAC
IV.RAFF..HHZ.D.2016.005.SAC
IV.RAFF..HHZ.D.2016.006.SAC
The original files would be in directory IV
IV
PTCC
BHE.D
BHN.D
BHZ.D
HHE.D
HHN.D
HHZ.D
IV.PTCC..HHZ.D.2016.001
IV.PTCC..HHZ.D.2016.002
IV.PTCC..HHZ.D.2016.003
IV.PTCC..HHZ.D.2016.004
IV.PTCC..HHZ.D.2016.005
IV.PTCC..HHZ.D.2016.006
LHE.D
LHN.D
LHZ.D
RAFF
BHE.D
BHN.D
BHZ.D
HHE.D
HHN.D
HHZ.D
IV.RAFF..HHZ.D.2016.001
IV.RAFF..HHZ.D.2016.002
IV.RAFF..HHZ.D.2016.003
IV.RAFF..HHZ.D.2016.004
IV.RAFF..HHZ.D.2016.005
IV.RAFF..HHZ.D.2016.006
RESU
HHZ.D
IV.RESU..HHZ.D.2016.001
IV.RESU..HHZ.D.2016.002
IV.RESU..HHZ.D.2016.003
IV.RESU..HHZ.D.2016.004
IV.RESU..HHZ.D.2016.005
IV.RESU..HHZ.D.2016.006