Sponsored Content
Full Discussion: Print 2 matching pattern
Top Forums UNIX for Beginners Questions & Answers Print 2 matching pattern Post 303030486 by bobbygsk on Monday 11th of February 2019 04:53:28 PM
Old 02-11-2019
Thank you - vgersh99, Scrutinizer, bakunin

Earlier I had to do it in 4-5 steps. Now I can do it in 1 easy step, thanks to you all
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pattern matching and print with sed

Hi It is possible with sed to print a pattern within a line matching regexp? So, the line looks like : 19:00:00 blablablabla jobid 2345 <2> the regexp is "jobid 2345" and the pattern is 56434. That the code for find... (2 Replies)
Discussion started by: nymus7
2 Replies

2. Shell Programming and Scripting

Pattern matching in Duplicated file and print once

Dear Experts, I have many alarms appeared in a file twice, i want to grep them with this info EVTTIME & DOMAIN, and print them in second file with 1 occurance. I have tried uniq -d test.txt > newfile and awk '!arr++' test.txt > newfile both are not working Please help me with this!!! ... (1 Reply)
Discussion started by: Danish Shakil
1 Replies

3. Shell Programming and Scripting

Print block of lines matching a pattern

Hi :), I am using the script to search "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER. But my problem is that at some occurrence my footer is different e.g. ";". How to modify the script so that MYPATTERN between HEADER and different... (1 Reply)
Discussion started by: vanand420
1 Replies

4. Shell Programming and Scripting

I want to print next 3 lines after pattern matching.

Dear Experts, I have file called file1 in which i am greping a pattern after that i want to next 3 lines when that pattern is matched. Ex:- file1 USA UK India Africa Hello Asia Europe Australia Hello Peter Robert Jo i want to next 3 lines after matching Hello... (12 Replies)
Discussion started by: naree
12 Replies

5. Shell Programming and Scripting

Script on pattern matching and print lines and export to excel

Hi Friends, I am working on a script.. Looking forward for your expert help..... My requirement is: I have a text file where, need to search equip * RTF or end of line with RTF ,once this pattern is found then print 2nd line, 6th line, 7th line to a different file. For Ex: equip 1... (34 Replies)
Discussion started by: shaliniyadav
34 Replies

6. UNIX for Dummies Questions & Answers

sed print matching pattern

Hi, i have data file like: START1 a b STOP c d START2 e STOP f START3 g STOP When one of the START<count> variable is passed, i should print all lines matching this until the first 'STOP' for example if 'START2' is provided for match, i should get the result as: START2 (1 Reply)
Discussion started by: ysrini
1 Replies

7. Shell Programming and Scripting

How to print all the lines after pattern matching?

I have a file that contains... Number -------------------- 1 2 3 4 i want to print all the numbers after the hyphen ... (6 Replies)
Discussion started by: ankitknit
6 Replies

8. Shell Programming and Scripting

Matching pattern in two files and print the line

Hi, I want to match the pattern in file1 with file2 and print the value in file2 and paste in file1 file1: ISHO RT SR Major 96.46778 Drop Call Rate CS Critical 0.5072662 ISHO RT SR Major 97.754364... (3 Replies)
Discussion started by: khalil
3 Replies

9. Shell Programming and Scripting

Want to print out lines with a matching pattern from file

Hi all, I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found. I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line. fgrep -o... (2 Replies)
Discussion started by: MonikaB
2 Replies

10. Shell Programming and Scripting

Print lines after matching two pattern

would like to print everything after matching two patterns AAA and BBB. output : CCC ZZZ sample data : AAA BBB CCC ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
Test::BDD::Cucumber::Executor(3pm)			User Contributed Perl Documentation			Test::BDD::Cucumber::Executor(3pm)

NAME
Test::BDD::Cucumber::Executor - Run through Feature and Harness objects VERSION
version 0.11 DESCRIPTION
The Executor runs through Features, matching up the Step Lines with Step Definitions, and reporting on progress through the passed-in harness. METHODS
steps add_steps The attributes "steps" is a hashref of arrayrefs, storing steps by their Verb. "add_steps()" takes step definitions of the item list form: ( [ Given => qr//, sub {} ], ), and populates "steps" with them. execute Execute accepts a feature object, a harness object, and an optional Test::BDD::Cucumber::TagSpec object and for each scenario in the feature which meets the tag requirements (or all of them, if you haven't specified one), runs "execute_scenario". execute_scenario Accepts a hashref of options, and executes each step in a scenario. Options: "feature" - A Test::BDD::Cucumber::Model::Feature object "feature_stash" - A hashref that should live the lifetime of feature execution "harness" - A Test::BDD::Cucumber::Harness subclass object "scenario" - A Test::BDD::Cucumber::Model::Scenario object "background_obj" - An optional Test::BDD::Cucumber::Model::Scenario object representing the Background "scenario_stash" - We'll create a new scenario stash unless you've posted one in. This is used exclusively for giving Background sections access to the same stash as the scenario they're running before. For each step, a Test::BDD::Cucumber::StepContext object is created, and passed to "dispatch()". Nothing is returned - everything is played back through the Harness interface. add_placeholders Accepts a text string and a hashref, and replaces " <placeholders" > with the values in the hashref, returning a string. dispatch Accepts a Test::BDD::Cucumber::StepContext object, and searches through the steps that have been added to the executor object, executing against the first matching one. You can also pass in a boolean 'short-circuit' flag if the Scenario's remaining steps should be skipped. skip_step Accepts a step-context, a result-type, and a textual reason, exercises the Harness's step start and step_done methods, and returns a skipped-test result. AUTHOR
Peter Sergeant "pete@clueball.com" LICENSE
Copyright 2011, Peter Sergeant; Licensed under the same terms as Perl perl v5.14.2 2012-05-20 Test::BDD::Cucumber::Executor(3pm)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy