从AIX中的文件中提取多行

我有一个需求,我需要根据输入字符串从AIX服务器中的文件中获取多行。

例如如果我在文件中有以下声明。我想获取从 INSERT 开始的行,并且应该继续获取行,直到遇到第一个分号为止。

select date from student ;

insert into abc
select * from abc;

所以我的输出应如下图所示:

insert into abc
select * from abc;
q178455231 回答:从AIX中的文件中提取多行

您可以使用tensorflow.python.framework.errors_impl.FailedPreconditionError: Error while reading resource variable res4q_branch2c_1/kernel from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/res4q_branch2c_1/kernel) [[{{node res4q_branch2c_1/convolution/ReadVariableOp}}]] tensorflow 1.15 app.run(debug=True,host='127.0.0.1',port=5000) tensorflow 2.0 app.run(debug=True,port=3000) 为您完成工作

sed

这里sed '/<pattern1>/,/<pattern2>/!d;/<pattern2>/q' 用于删除不属于该范围的行,然后d第一次遇到范围末尾时退出。

q

sed '/insert/,/;/!d;/select/q' test.txt

o / p-

sed '/insert/,/;/!d;/;/q' test.txt
本文链接:https://www.f2er.com/3117587.html

大家都在问