using sed to print between two lines that contain a pattern
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Trying to print lines that contain a pattern between to static lines using sed.
i.e.
5,15 /pattern/p
it will only print lines 5 AND 15(if the string is in the line) not between 5 and 15(inclusively). However, I was under the impression that #,# will do between the lines, not only those two lines.
shell-script sed
New contributor
add a comment |Â
up vote
0
down vote
favorite
Trying to print lines that contain a pattern between to static lines using sed.
i.e.
5,15 /pattern/p
it will only print lines 5 AND 15(if the string is in the line) not between 5 and 15(inclusively). However, I was under the impression that #,# will do between the lines, not only those two lines.
shell-script sed
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Trying to print lines that contain a pattern between to static lines using sed.
i.e.
5,15 /pattern/p
it will only print lines 5 AND 15(if the string is in the line) not between 5 and 15(inclusively). However, I was under the impression that #,# will do between the lines, not only those two lines.
shell-script sed
New contributor
Trying to print lines that contain a pattern between to static lines using sed.
i.e.
5,15 /pattern/p
it will only print lines 5 AND 15(if the string is in the line) not between 5 and 15(inclusively). However, I was under the impression that #,# will do between the lines, not only those two lines.
shell-script sed
shell-script sed
New contributor
New contributor
New contributor
asked 5 mins ago
SheepWaffle
32
32
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
SheepWaffle is a new contributor. Be nice, and check out our Code of Conduct.
SheepWaffle is a new contributor. Be nice, and check out our Code of Conduct.
SheepWaffle is a new contributor. Be nice, and check out our Code of Conduct.
SheepWaffle is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478575%2fusing-sed-to-print-between-two-lines-that-contain-a-pattern%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password