2017-10-24 linux use sed print certain lines 用sed命令sed -n ‘5,10p’ filename 这样你就可以只查看文件的第5行到第10行。 linux 如何显示一个文件的某几行(中间几行) sed第一行、第二行至最后最后添加一列12345cmd_str = 'sed -i "1s/$/\t%s-mirror/" %s' % (str(file_col_num + 1),cmd_str = 'sed -i "1s/$/\tmirror/" %s' % local_upload_sample_file_path_namecmd_str = 'sed -i \'2,$s/$/\t0/\' %s' % local_upload_sample_file_path_namecmd_str = 'sed -i \'1d %s\'' % local_upload_sample_file_path_name2cmd_str = 'sed -i \'s/$/\t1/\' %s' % local_upload_sample_file_path_name2 Adding a Column of values in a tab delimited file linux中sed的用法 Newer Chinese punctuation to English punctuation Older shell last param