问题描述
如何打开文件,跳过前2行并获得第50个字符?
EXP 0 R:\000\un\111\ e00 \ e00noLog \ 1006 \bdry_arc.e00
ARC 2
1 1 0 0 0 0 7
即我想要得到7在第三行,我该怎么做?
thx !!
How can I open a file, skip first 2 lines and get the 50th character?
EXP 0 R:\000\un\111\e00\e00noLog\1006\bdry_arc.e00
ARC 2
1 1 0 0 0 0 7
i.e., I want to get the "7" in the third line, how can I do that?
thx!!
推荐答案
7是这一行的第70个字符,而不是第50个字符。
使用标准的unix工具做一些事情比重新发明更好:
head -3 bla |尾巴-1 | cut -b 50
亲切的问候
frank
-
弗兰克Schmitt
4SC AG电话:+49 89 700763-0
电子邮件:frankNO DOT SPAMschmitt AT 4sc DOT com
The 7 is the 70th character on this line, not the 50th.
Some things are better done with standard unix tools than reinvented:
head -3 bla | tail -1 | cut -b 50
kind regards
frank
--
Frank Schmitt
4SC AGphone: +49 89 700763-0
e-mail: frankNO DOT SPAMschmitt AT 4sc DOT com
这篇关于如何打开文件,跳过前2行并获得第50个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!