- 统计文件
test.sh行数
awk 'END{print NR}' test.sh
- 合并多个文件到一个文件
cat a.txt b.txt > ab.txt
- jupyter 参数传递
area = 'asia'
country = 'JP'
! echo ../common/tmp/{area}_{country}/*
- 数据采样
sort -R main.txt | head -5
- 替换文件中的 tab 分隔符为逗号
# https://stackoverflow.com/questions/3509332/how-to-convert-a-tab-separated-file-into-a-comma-separated-file
sed 's/\t/,/g' input_file > output_file