- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogramD2.sh
More file actions
Latest commit
10 lines (8 loc) · 849 Bytes
/
Copy pathprogramD2.sh
File metadata and controls
10 lines (8 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
# find . -name '*.csv '-type f | xargs cat | sed -e '1d'| awk -F, '{print $1,$2,$4,$6,$8,$10,$12,$14,$16,$18,$20,$22,$24,$26,$28,$30,$32,$34,$36,$38,$40,$42,$44,$46,$48,$50,$52,$54,$56,$58,$60,$62,$64,$66,$68,$70,$72,$74,$76,$78,$80,$82,$84,$86,$88,$90,$92,$94,$96,$98,$100,$102,$104,$106,$108,$110,$112,$114,$116,$118,$120,$122,$124,$126,$128,$130}' | tr " " "," > test{}.csv
forfin*.csv;do# 全ての d*.txt ファイルについて繰り返し
tr -d '\r'<${f}|
sed -e '1d'|
awk -F, '{print $1,$2,$4,$6,$8,$10,$12,$14,$16,$18,$20,$22,$24,$26,$28,$30,$32,$34,$36,$38,$40,$42,$44,$46,$48,$50,$52,$54,$56,$58,$60,$62,$64,$66,$68,$70,$72,$74,$76,$78,$80,$82,$84,$86,$88,$90,$92,$94,$96,$98,$100,$102,$104,$106,$108,$110,$112,$114,$116,$118,$120,$122,$124,$126,$128,$130}'|
tr """,">${f}test.csv
done