Sponsored Content
Top Forums Shell Programming and Scripting Unix gurus : how to grep this pattern? Post 302295924 by zaxxon on Tuesday 10th of March 2009 02:17:15 AM
Old 03-10-2009
Then why don't you just change /^MESSAGE/ vs /Sending SIGKILL/?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any RF unix gurus out there?

I am having a problem here. We are having several problems in regards to hung process's on unix (HPUX box), caused by my RF equipment (Mobile data capture units). these contact the host via a simply telnet session and locks the system? Is it a timeout problem as the timeout is disabled on the host. (5 Replies)
Discussion started by: Subrosa
5 Replies

2. Shell Programming and Scripting

Help with shell script - Unix Gurus calling

Unix Gurus, I have been breaking my head to get this done..seems simple.. I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines. eg : Line1 Line2 Line3 Line4 Line5 Line6 Error Line7 Line8 Line9 Error Line10 (4 Replies)
Discussion started by: ravred
4 Replies

3. Shell Programming and Scripting

Unix/Linux gurus...here is Q 4u

Suppose I have two files 1.txt and 2.txt. My aim is to find (Total execution time/Number of executions) then sort the result as in decreasing order. Can anyone provide me any shell/perl/awk script or a Command to do that in faster way ? 1.txt : =============================== Number of... (4 Replies)
Discussion started by: Rahulpict
4 Replies

4. Shell Programming and Scripting

VI Editor - question for unix gurus !!

I have created a dummy file -demo.txt On my machine-A (oslevel-5300-08) I can display the file content in HEX format through VI editor using :%!xxd but on other machine-B (oslevel - 5300-06) , I get error as "sh: xxd: not found." machine-A: $ cat demo.txt Hello World ! I can display... (7 Replies)
Discussion started by: Rahulpict
7 Replies

5. Shell Programming and Scripting

Want to grep for a pattern and display the content above that pattern

Hi, When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part. For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

6. Homework & Coursework Questions

finding pattern without grep in unix

how can i find related pattern in a text file without using grep command in unix (2 Replies)
Discussion started by: feint
2 Replies

7. Shell Programming and Scripting

Need Urgent Help from UNIX gurus to get specific data from a file

Hi, I have a file monitor.txt as below... # Times are converted to local time from GMT. # Local Timezone: EST (GMT -05:00) PARAM1 { TIME 30; CC1 "xxxxx"; CC2 "xxxxx"; CC3 "xxxxx"; CC4 "xxxxx"; } PARAM2 { 4061 :... (3 Replies)
Discussion started by: zaq1xsw2
3 Replies

8. Shell Programming and Scripting

How to Grep than scan line below grep pattern

Hello Colleagues, I have a file that looks like below. 6-12731913-12731913 9230760143480 410018547148230 20131002193434+0500 20131002193434+0500 ;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0 20131009 92220056296730 CC0P abc Core_Context_R1A SMS 6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies

9. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

10. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies
Test::Unit::Assert(3pm) 				User Contributed Perl Documentation				   Test::Unit::Assert(3pm)

NAME
Test::Unit::Assert - unit testing framework assertion class SYNOPSIS
# this class is not intended to be used directly, # normally you get the functionality by subclassing from # Test::Unit::TestCase use Test::Unit::TestCase; # more code here ... $self->assert($your_condition_here, $your_optional_message_here); # or, for regular expression comparisons: $self->assert(qr/some_pattern/, $result); # or, for functional style coderef tests: $self->assert(sub { $_[0] == $_[1] or $self->fail("Expected $_[0], got $_[1]"); }, 1, 2); # or, for old style regular expression comparisons # (strongly deprecated; see warning below) $self->assert(scalar("foo" =~ /bar/), $your_optional_message_here); # Or, if you don't mind us guessing $self->assert_equals('expected', $actual [, $optional_message]); $self->assert_equals(1,$actual); $self->assert_not_equals('not expected', $actual [, $optional_message]); $self->assert_not_equals(0,1); # Or, if you want to force the comparator $self->assert_num_equals(1,1); $self->assert_num_not_equals(1,0); $self->assert_str_equals('string','string'); $self->assert_str_not_equals('stringA', 'stringB'); # assert defined/undefined status $self->assert_null(undef); $self->assert_not_null(''); DESCRIPTION
This class contains the various standard assertions used within the framework. With the exception of the "assert(CODEREF, @ARGS)", all the assertion methods take an optional message after the mandatory fields. The message can either be a single string, or a list, which will get concatenated. Although you can specify a message, it is hoped that the default error messages generated when an assertion fails will be good enough for most cases. Methods assert_equals(EXPECTED, ACTUAL [, MESSAGE]) assert_not_equals(NOTEXPECTED, ACTUAL [, MESSAGE]) The catch all assertions of (in)equality. We make a guess about whether to test for numeric or string (in)equality based on the first argument. If it looks like a number then we do a numeric test, if it looks like a string, we do a string test. If the first argument is an object, we check to see if the '==' operator has been overloaded and use that if it has, otherwise we do the string test. assert_num_equals assert_num_not_equals Force numeric comparison with these two. assert_str_equals assert_str_not_equals Force string comparison assert_matches(qr/PATTERN/, STRING [, MESSAGE]) assert_does_not_match(qr/PATTERN/, STRING [, MESSAGE]) Assert that STRING does or does not match the PATTERN regex. assert_deep_equals(A, B [, MESSAGE ]) Assert that reference A is a deep copy of reference B. The references can be complex, deep structures. If they are different, the default message will display the place where they start differing. NOTE This is NOT well-tested on circular references. Nor am I quite sure what will happen with filehandles. assert_null(ARG [, MESSAGE]) assert_not_null(ARG [, MESSAGE]) Assert that ARG is defined or not defined. assert(BOOLEAN [, MESSAGE]) Checks if the BOOLEAN expression returns a true value that is neither a CODE ref nor a REGEXP. Note that MESSAGE is almost non optional in this case, otherwise all the assertion has to go on is the truth or otherwise of the boolean. If you want to use the "old" style for testing regular expression matching, please be aware of this: the arguments to assert() are evaluated in list context, e.g. making a failing regex "pull" the message into the place of the first argument. Since this is usually just plain wrong, please use scalar() to force the regex comparison to yield a useful boolean value. assert(qr/PATTERN/, ACTUAL [, MESSAGE]) Matches ACTUAL against the PATTERN regex. If you omit MESSAGE, you should get a sensible error message. assert(CODEREF, @ARGS) Calls CODEREF->(@ARGS). Assertion fails if this returns false (or throws Test::Unit::Failure) assert_raises(EXCEPTION_CLASS, CODEREF [, MESSAGE]) Calls CODEREF->(). Assertion fails unless an exception of class EXCEPTION_CLASS is raised. multi_assert(ASSERTION, @ARGSETS) Calls $self->assert(ASSERTION, @$ARGSET) for each $ARGSET in @ARGSETS. ok(@ARGS) Simulates the behaviour of the Test module. Deprecated. AUTHOR
Copyright (c) 2000-2002, 2005 the PerlUnit Development Team (see Test::Unit or the AUTHORS file included in this distribution). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o Test::Unit::Assertion o Test::Unit::Assertion::Regexp o Test::Unit::Assertion::CodeRef o Test::Unit::Assertion::Boolean o Test::Unit::TestCase o Test::Unit::Exception o The framework self-testing suite (t::tlib::AllTests) perl v5.8.8 2006-09-13 Test::Unit::Assert(3pm)
All times are GMT -4. The time now is 12:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy