回答編集履歴
3
コード変更
test
CHANGED
@@ -16,13 +16,11 @@
|
|
16
16
|
|
17
17
|
do
|
18
18
|
|
19
|
-
d=${f%/*}
|
20
|
-
|
21
19
|
set $(echo ${f##*/} | (IFS=_ read f1 f2 f3; echo $f1 $f2))
|
22
20
|
|
23
|
-
#
|
21
|
+
#mv $f ${f%/*}/${header}${dept[$2]}${1:0:2}.csv
|
24
22
|
|
25
|
-
echo "mv $f $
|
23
|
+
echo "mv $f ${f%/*}/${header}${dept[$2]}${1:0:2}.csv"
|
26
24
|
|
27
25
|
done
|
28
26
|
|
2
コード変更
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
header=XXXX
|
14
14
|
|
15
|
-
for f in $(find $root -type f -name '*[0-9].csv')
|
15
|
+
for f in $(find $root -type f -name '*_*_[0-9]*.csv')
|
16
16
|
|
17
17
|
do
|
18
18
|
|
1
コード変更
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
d=${f%/*}
|
20
20
|
|
21
|
-
set $(echo ${f##*/} |
|
21
|
+
set $(echo ${f##*/} | (IFS=_ read f1 f2 f3; echo $f1 $f2))
|
22
22
|
|
23
23
|
# mv $f $d/${header}${dept[$2]}${1:0:2}.csv
|
24
24
|
|