[英]Extracting multiple lines from a binary file with the STRINGS command
I am not a programmer. 我不是程序员。 I know a couple of unix/linux commands (do not know awk). 我知道几个unix / linux命令(不知道awk)。
I need to extract text lines that contain a specific sequence of string characters. 我需要提取包含特定字符串字符序列的文本行。
Here is my example: 这是我的示例:
strings -f -n30 i15app.fmb | grep -i getApplQuota
The output for this is : 输出为:
i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota, i15app.fmb:v_return:= stud.i36pkg.getApplQuota(:b6.igxquota,
I need to also extract a number of lines of text after this result. 在此结果之后,我还需要提取多行文本。
For anybody that is wondering, I need to extract the lines from an Oracle forms program and do not have access to Forms Developer. 对于任何想知道的人,我都需要从Oracle表单程序中提取行,并且不能访问Forms Developer。
Is this possible? 这可能吗?
Regards, 问候,
Phlip lip
try this; 尝试这个;
strings -f -n30 i15app.fmb | grep -i getApplQuota && strings -f -n30 i15app.fmb | grep -ic getApplQuota
grep -c will print the total lines matched grep -c将打印匹配的总行
Eg; 例如;
user@host$ strings -f -n30 i15app.fmb | grep -i getApplQuota && strings -f -n30 i15app.fmb | grep -ic getApplQuota
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
i15app.fmb: i15app.fmb: v_return := stud.i36pkg.getApplQuota(:b6.igxquota,
7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.