cat quora_duplicate_questions.tsv | awk -F "\t" ‘BEGIN{a=""} {if ($1=="\""){print a""$0;} else if ($5==""){ a=$4; } else if ($5!="" && $6==""){ a=$4"\t"$5; } else i f (NF >= 6) { print $4"\t"$5"\t"$6;}}‘ > temp.tsv
原文:https://www.cnblogs.com/shona/p/12222747.html