суммировать столбцы на основе заголовка

#!/bin/bash
# step 1: Remove the header:
tail -n +4./bigfile.csh > bigfile_without_header.csh

# step 2: Split the file:
split -d -l 1000 --additional-suffix=.csh./bigfile_without_header.csh split-

# step 3: Add the header back to each file:
HEADER='#!/bin/csh\nset config_dir = /proj/ABC/users/nhannguyen/work/verif/qc/input\nset testbench_dir = /proj/ABC/users/nhannguyen/work/verif/qc/testbench/TT_p025c\n'
sed -i "1s,^,$HEADER," split-*.csh
0
28.05.2020, 18:10
0 ответов

Теги

Похожие вопросы