网上给的一般都是选择那些行追加上去,
但我是想除了文本第一行都追加。
1. 怎么直接表示除了第一行? #否则还要计算总行数
2. 其实这些文件都是同列不同行的数据框,列名一样行名各异,我打算合并,现在要将其它文件的列名都除去。追加过程会检测到它们的数一致,自动对齐吗#格式上?
#this is three files:a.txt b.txt c.txt
#Delete the first line of b.txt and c.txt,
sed -i '1d' b.txt
sed -i '1d' c.txt
cat a.txt b.txt c.txt >total.txt
linux下用shell或python相对比较简单
#this is three files:a.txt b.txt c.txt
#Delete the first line of b.txt and c.txt, then b.txt and c.txt are appended to the back of the a.txt, and output to the total.txt
sed -i '1d' b.txt
sed -i '1d' c.txt
cat a.txt b.txt c.txt >total.txt