回答編集履歴
3
test
CHANGED
@@ -16,8 +16,8 @@
|
|
16
16
|
for(i in cnt) printf("%s:%4d\n", i, cnt[i])
|
17
17
|
}'
|
18
18
|
|
19
|
-
|
19
|
+
2023-01: 14
|
20
|
-
|
20
|
+
2023-02: 24
|
21
|
-
11: 6
|
21
|
+
2023-11: 6
|
22
|
-
12: 17
|
22
|
+
2023-12: 17
|
23
23
|
```
|
2
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
2023-02-10 21:00:00.000000000 +0900 8.txt
|
11
11
|
2023-01-20 21:00:00.000000000 +0900 9.txt
|
12
12
|
|
13
|
-
$ find
|
13
|
+
$ find . -maxdepth 1 -type f -printf '%TY-%Tm ' -exec wc -l {} \; |
|
14
14
|
awk '{ cnt[$1] += $2 }END{
|
15
15
|
PROCINFO["sorted_in"] = "@ind_str_asc"
|
16
16
|
for(i in cnt) printf("%s:%4d\n", i, cnt[i])
|
1
test
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
※ タイムスタンプの「月」のみで集計しています。
|
2
1
|
```bash
|
3
2
|
$ stat -c "%y %n" *.txt
|
4
3
|
2023-11-09 20:00:00.000000000 +0900 1.txt
|
@@ -11,11 +10,10 @@
|
|
11
10
|
2023-02-10 21:00:00.000000000 +0900 8.txt
|
12
11
|
2023-01-20 21:00:00.000000000 +0900 9.txt
|
13
12
|
|
14
|
-
$ find . -type f |
|
15
|
-
|
13
|
+
$ find data -maxdepth 1 -type f -printf '%TY-%Tm ' -exec wc -l {} \; |
|
16
14
|
awk '{ cnt[$1] += $2 }END{
|
17
|
-
PROCINFO["sorted_in"] = "@ind_
|
15
|
+
PROCINFO["sorted_in"] = "@ind_str_asc"
|
18
|
-
for(i in cnt) printf("%
|
16
|
+
for(i in cnt) printf("%s:%4d\n", i, cnt[i])
|
19
17
|
}'
|
20
18
|
|
21
19
|
1: 14
|