긴 파일 목록을 이름을 기준으로 여러 하위 디렉터리로 정렬

긴 파일 목록을 이름을 기준으로 여러 하위 디렉터리로 정렬

/home/dir/dir2/oldspot다음 형식으로 폴더에 텍스트와 날짜로 태그가 지정된 1000개 이상의 파일 세트가 있습니다 .

2020년 1월 7일 23:08에 촬영된 파일 고도 5 예

aaaaaa-bbbb-cc10dddd-L1-202007012308-05.std
aaaaaa-bbbb-cc10dddd-L1-"year""month""date""hour""minute"-"elevation".std

파일은 2020년 2월 7일 01:48에 촬영되었습니다.

aaaaaa-bbbb-cc10dddd-L1-202007020148.ref

/home/dir1/yearmonthdayhour시간 일치 (위 형식 참조)와 고도별로 모든 파일을 하위 디렉터리로 정렬하는 bash 스크립트를 만들고 싶지만 /home/dir/yearmonthdayhour/elevation자동화되지 않았습니다(예: 많은 mkdir 및 cp의 경우).

2020070123 고도 05에서 수집된 모든 데이터는 /home/dir/2020070123/2020070123-05.std의 하위 디렉터리로 이동됩니다.

/home/dir/2020070123/2020070123-05.std의 내용은 다음과 같습니다.

 aaaaaa-bbbb-cc10-dddd-L1-202007012308-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-05.std

여기에는 7시간 분량의 데이터가 포함되어 있습니다(글자 제한이 있습니다). 총 데이터 범위는 2020년 1월 7일 11시 31분(202007011131)부터 2020년 7월 2일 08시 32분(202007020832)까지 약 12~25분 간격으로 구분된 타임스탬프가 있는 12개의 파일이 있습니다.


 aaaaaa-bbbb-cc10dddd-L1-202007012004-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012004.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012016-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012016.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012027-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012027.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012039-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012039.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012050-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012050.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012102-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012102.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012113-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012113.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012125-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012125.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012136-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012136.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012148-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012148.ref
 aaaaaa-bbbb-cc10dddd-L1-202007012159-00.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-01.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-02.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-03.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-04.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-05.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-06.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-07.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-08.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-09.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159-10.std
 aaaaaa-bbbb-cc10dddd-L1-202007012159.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012211.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012222.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012234.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012245.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012257.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012308.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012319.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012331.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012342.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007012354.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020005.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020017.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020028.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020040.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020051.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020103.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020114.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020125.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020137.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020148.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020200.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020211.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020223.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020234.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020246.ref
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-00.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-01.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-02.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-03.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-04.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-05.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-06.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-07.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-08.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-09.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257-10.std
 aaaaaa-bbbb-cc10-dddd-L1-202007020257.ref



내가 사용하는 스크립트. 더 읽기 쉬운 것을 찾고 있습니다. 말도 안 되는 일이지만 이 스크립트는 실제로 작동합니다. 첫 번째 부분은 홈 디렉토리를 설정하는 것입니다.

# if the input directory has a trailing slash, remove it

if [ ! -z "$1" ]; then
  # remove trailing slash
  basedir=`echo "$1" | sed -e "s/\/$//"`
else
  # copy dirname
  basedir=$1
fi

if [ ! -d $basedir ]; then
  echo "Fatal error, argument is not a local directory -- bailing"
  exit 1
fi


#!/bin/sh
#

mkdir $sortdir/sort

for i in {11..23}; do
  mkdir $hrdir/01"$i"
done

for i in {00..08}; do
  mkdir $hrdir/02"$i"
done

for i in {01..10}; do
  mkdir $elevdir1/0111-"$i"
done

for i in {01..10}; do
  mkdir $elevdir2/0112-"$i"
done

for i in {01..10}; do
  mkdir $elevdir3/0113-"$i"
done

for i in {01..10}; do
  mkdir $elevdir4/0114-"$i"
done

for i in {01..10}; do
  mkdir $elevdir5/0115-"$i"
done

for i in {01..10}; do
  mkdir $elevdir6/0116-"$i"
done

for i in {01..10}; do
  mkdir $elevdir7/0117-"$i"
done

for i in {01..10}; do
  mkdir $elevdir8/0118-"$i"
done

for i in {01..10}; do
  mkdir $elevdir9/0119-"$i"
done

for i in {01..10}; do
  mkdir $elevdir10/0120-"$i"
done

for i in {01..10}; do
  mkdir $elevdir11/0121-"$i"
done

for i in {01..10}; do
  mkdir $elevdir12/0122-"$i"
done

for i in {01..10}; do
  mkdir $elevdir13/0123-"$i"
done

for i in {01..10}; do
  mkdir $elevdir14/0200-"$i"
done

for i in {01..10}; do
  mkdir $elevdir15/0201-"$i"
done

for i in {01..10}; do
  mkdir $elevdir16/0202-"$i"
done

for i in {01..10}; do
  mkdir $elevdir17/0203-"$i"
done

for i in {01..10}; do
  mkdir $elevdir18/0204-"$i"
done

for i in {01..10}; do
  mkdir $elevdir19/0205-"$i"
done

for i in {01..10}; do
  mkdir $elevdir20/0206-"$i"
done

for i in {01..10}; do
  mkdir $elevdir21/0207-"$i"
done

for i in {01..10}; do
  mkdir $elevdir22/0208-"$i"
done


for i in {11..23}; do
  mkdir $hrdir/01"$i"/01"$i"-ref
done

for i in {00..08}; do
  mkdir $hrdir/02"$i"/02"$i"-ref
done


for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070111*-"$i".std $elevdir1/0111-"$i"
done


for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070112*-"$i".std $elevdir2/0112-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070113*-"$i".std $elevdir3/0113-"$i"
done


for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070114*-"$i".std $elevdir4/0114-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070115*-"$i".std $elevdir5/0115-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070116*-"$i".std $elevdir6/0116-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070117*-"$i".std $elevdir7/0117-"$i"
done


for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070118*-"$i".std $elevdir8/0118-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070119*-"$i".std $elevdir9/0119-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070120*-"$i".std $elevdir10/0120-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070121*-"$i".std $elevdir11/0121-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070122*-"$i".std $elevdir12/0122-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070123*-"$i".std $elevdir13/0123-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070200*-"$i".std $elevdir14/0200-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070201*-"$i".std $elevdir15/0201-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070202*-"$i".std $elevdir16/0202-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070203*-"$i".std $elevdir17/0203-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070204*-"$i".std $elevdir18/0204-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070205*-"$i".std $elevdir19/0205-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070206*-"$i".std $elevdir20/0206-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070207*-"$i".std $elevdir21/0207-"$i"
done

for i in {01..10}; do 
  cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070208*-"$i".std $elevdir22/0208-"$i"
done

cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070111*.ref  $elevdir1/0111-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070112*.ref  $elevdir2/0112-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070113*.ref  $elevdir3/0113-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070114*.ref  $elevdir4/0114-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070115*.ref  $elevdir5/0115-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070116*.ref  $elevdir6/0116-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070117*.ref  $elevdir7/0117-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070118*.ref  $elevdir8/0118-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070119*.ref  $elevdir9/0119-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070120*.ref  $elevdir10/0120-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070121*.ref  $elevdir11/0121-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070122*.ref  $elevdir12/0122-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070123*.ref  $elevdir13/0123-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070200*.ref  $elevdir14/0200-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070201*.ref  $elevdir15/0201-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070202*.ref  $elevdir16/0202-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070203*.ref  $elevdir17/0203-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070204*.ref  $elevdir18/0204-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070205*.ref  $elevdir19/0205-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070206*.ref  $elevdir20/0206-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070207*.ref  $elevdir21/0207-ref
cp $stddir/aaaaaa-bbbb-cc10-dddd-L1-2020070208*.ref  $elevdir22/0208-ref

답변1

이러한 디렉토리 생성을 단순화하려면 -p이 옵션을 에 배포 mkdir하고 "중괄호 확장" 사용을 확장하는 것을 고려할 수 있습니다.

for i in {1..22}
  do    echo mkdir -p ${elevdir}$i/0$(printf "%1d%02d" $((i/14+1)) $(((i+10)%24)))-{01..10}
  done
mkdir -p Josef1/0111-01 Josef1/0111-02 Josef1/0111-03 ...
mkdir -p Josef2/0112-01 Josef2/0112-02 Josef2/0112-03 ...
mkdir -p Josef3/0113-01 Josef3/0113-02 Josef3/0113-03 ...
mkdir -p Josef4/0114-01 Josef4/0114-02 Josef4/0114-03 ...
mkdir -p Josef5/0115-01 Josef5/0115-02 Josef5/0115-03 ...
mkdir -p Josef6/0116-01 Josef6/0116-02 Josef6/0116-03 ...
mkdir -p Josef7/0117-01 Josef7/0117-02 Josef7/0117-03 ...
mkdir -p Josef8/0118-01 Josef8/0118-02 Josef8/0118-03 ...
mkdir -p Josef9/0119-01 Josef9/0119-02 Josef9/0119-03 ...
mkdir -p Josef10/0120-01 Josef10/0120-02 Josef10/0120-03 ...

이것은 echo예방 조치입니다. 마음에 드는 것이 있으면 제거하십시오.

확신이 든다면 실제 복사 작업에도 비슷한 방법을 시도해 보세요. 최소한 cp한 번에 모든 것을 수집 할 수 있습니다 for i in {1..10}.

for i in {1..10}
  do cp ...
     cp ...
     cp ...
  done

편집하다:아니면 더 간단하게 시도해 보세요.

for i in {111..123} {200..208};   do    echo mkdir -p ${elevdir}$((i-110-i/200*76))/0$i-{01..10};   done

관련 정보