cut head paste
作者:互联网
# cut -d'"' -f4,10 data/an4_converted/test_manifest.json |head -10 | cut -d'"' -f1 |paste
./data/an4_converted/wavs/an406-fcaw-b.wav
./data/an4_converted/wavs/an407-fcaw-b.wav
./data/an4_converted/wavs/an408-fcaw-b.wav
./data/an4_converted/wavs/an409-fcaw-b.wav
./data/an4_converted/wavs/an410-fcaw-b.wav
./data/an4_converted/wavs/cen1-fcaw-b.wav
./data/an4_converted/wavs/cen2-fcaw-b.wav
./data/an4_converted/wavs/cen3-fcaw-b.wav
./data/an4_converted/wavs/cen4-fcaw-b.wav
./data/an4_converted/wavs/cen5-fcaw-b.wav
# cut -d'"' -f4,10 data/an4_converted/test_manifest.json |head -10 | cut -d'"' -f1 |paste -s -d"," -
./data/an4_converted/wavs/an406-fcaw-b.wav,./data/an4_converted/wavs/an407-fcaw-b.wav,./data/an4_converted/wavs/an408-fcaw-b.wav,./data/an4_converted/wavs/an409-fcaw-b.wav,./data/an4_converted/wavs/an410-fcaw-b.wav,./data/an4_converted/wavs/cen1-fcaw-b.wav,./data/an4_converted/wavs/cen2-fcaw-b.wav,./data/an4_converted/wavs/cen3-fcaw-b.wav,./data/an4_converted/wavs/cen4-fcaw-b.wav,./data/an4_converted/wavs/cen5-fcaw-b.wav
# cat data/an4_converted/test_manifest.json |head -10
{"audio_filepath": "./data/an4_converted/wavs/an406-fcaw-b.wav", "duration": 4.0, "text": "rubout g m e f three nine"}
{"audio_filepath": "./data/an4_converted/wavs/an407-fcaw-b.wav", "duration": 4.1, "text": "erase c q q f seven"}
{"audio_filepath": "./data/an4_converted/wavs/an408-fcaw-b.wav", "duration": 3.3, "text": "b a o z five three"}
{"audio_filepath": "./data/an4_converted/wavs/an409-fcaw-b.wav", "duration": 0.8, "text": "go"}
{"audio_filepath": "./data/an4_converted/wavs/an410-fcaw-b.wav", "duration": 3.6, "text": "rubout n i m n one"}
{"audio_filepath": "./data/an4_converted/wavs/cen1-fcaw-b.wav", "duration": 2.3, "text": "w o o d"}
{"audio_filepath": "./data/an4_converted/wavs/cen2-fcaw-b.wav", "duration": 2.9, "text": "c i n d y"}
{"audio_filepath": "./data/an4_converted/wavs/cen3-fcaw-b.wav", "duration": 1.9, "text": "one three seven"}
{"audio_filepath": "./data/an4_converted/wavs/cen4-fcaw-b.wav", "duration": 3.0, "text": "m e l v i n"}
{"audio_filepath": "./data/an4_converted/wavs/cen5-fcaw-b.wav", "duration": 6.2, "text": "p l e a s a n t h i l l s"}
标签:head,cut,fcaw,paste,an4,converted,wavs,wav,data 来源: https://www.cnblogs.com/morganh/p/15853517.html