Created
December 30, 2014 12:51
-
-
Save loongmxbt/0a24aae21b562aac9547 to your computer and use it in GitHub Desktop.
Agilent 4294A 阻抗分析仪 Am-Ph 数据批处理
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.删除 1-21行 | |
2.保留 22-822行 (记为A区块,3列数字,由tab分割) | |
3.删除 823-828行 | |
4.保留 829-1629行 (记为B区块,3列数字,由tab分割) | |
5.将 B区块的第2列 替换掉 A区块的第3列,然后删除B区块 | |
选取A区块的1、2列(频率、幅值)和B区块的第2列(相角)合并为一个新区块,导出文本文件(频率、幅值、相角)。 | |
cd 你的文件所在目录 | |
mkdir -p ../output | |
for f in *; do | |
paste <(sed -n 22,822p "$f"|cut -f1,2) <(sed -n 829,1629p "$f"|cut -f2) > ../output/"$(basename "$f")" | |
done | |
注意数据文件名不要以符号开头 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment