Sponsored Content
Top Forums Shell Programming and Scripting Using grep or something similar to invert search. Post 302785269 by PikK45 on Monday 25th of March 2013 07:32:44 AM
Old 03-25-2013
in that case egrep should help.

Code:
egrep -v "sent to primary BE|CC-Request-Type 3 received in state Idle|Unknown session-id. Origin-Host" /var/adm/messages* | wc -l

This User Gave Thanks to PikK45 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Printing the invert of the last field of awk

in csh set x = "/home/usr/dir1/file1" if i do: echo $x | awk -F\/ '{print $NF}' will result to: "file1" how do i invert the output to: "/home/usr/dir1" :confused: (2 Replies)
Discussion started by: jehrome_rando
2 Replies

2. UNIX for Dummies Questions & Answers

what is the similar command for "grep -v" in nawk?

Can any one please say about the below, using, grep -v "name" file.txt the result of above command will be it will print all the lines except the line which having the word "name" similarly, nawk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print;c=a}b{r=$0}' b=0 a=1 s="name" file.txt ... (7 Replies)
Discussion started by: prsam
7 Replies

3. Shell Programming and Scripting

Help in grep function or similar using awk

I have a list of id; for example: file 1 dfghd dfghe dfgey dfgeu I have another data file that contain this ids as headers; for ex. file2 >dfghd gfdgfddl;klfkld;ld;lgl;dld'l'dv >dfghe gkwhjhsgdjdjdjhjddj >dfgey jdkjfhdjhfdkjhfdkhkdk I wanted to compare file 1 and file 2... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

4. Shell Programming and Scripting

Invert Matrix of Data - Perl

I have columnar data in arrays perl, Example - @a = (1,2,3); @array1 = (A,B,C); @array2 = (D,E,F); @array3 = (I,R,T); I want the data to be formatted and printed as 1 A D I 2 B E F 3 C F T and so on... (8 Replies)
Discussion started by: dinjo_jo
8 Replies

5. Programming

How to invert order in QuickSort

Hello! Iam trying to reverse my order of quicksort in C from asc order (1-99) that is the original way of the algoritm, to descending (99-1). I've tried so many ways that iam a kind of lost now!:s The original quicksort is: void swap(int* a, int* B) { int tmp; tmp = *a; *a = *b; ... (1 Reply)
Discussion started by: rafazz
1 Replies

6. Shell Programming and Scripting

awk to search similar strings and add their values

Hi, I have a text file with the following content: monday,20 tuesday,10 wednesday,29 monday,10 friday,12 wednesday,14 monday,15 thursday,34 i want the following output: monday,45 tuesday,10 wednesday,43 friday,12 (3 Replies)
Discussion started by: prashu_g
3 Replies

7. Shell Programming and Scripting

awk to search similar strings and arrange in a specified pattern

Hi, I'm running a DB query which returns names of people and writes it in a text file as shown below: Carey, Jim; Cena, John Cena, John Sen, Tim; Burt, Terrence Lock, Jessey; Carey, Jim Norris, Chuck; Lee, Bruce Rock, Dwayne; Lee, Bruce I want to use awk and get all the names... (9 Replies)
Discussion started by: prashu_g
9 Replies

8. Shell Programming and Scripting

To search for a particular tag in xml and collate all similar tag values and display them count

I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help File: <xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies

9. UNIX for Beginners Questions & Answers

How to use a grep search to search for a specific string within multiple directories?

Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried: grep -lr "this string" * but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
Plack::Session::Store::File(3pm)			User Contributed Perl Documentation			  Plack::Session::Store::File(3pm)

NAME
Plack::Session::Store::File - Basic file-based session store SYNOPSIS
use Plack::Builder; use Plack::Middleware::Session; use Plack::Session::Store::File; my $app = sub { return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ]; }; builder { enable 'Session', store => Plack::Session::Store::File->new( dir => '/path/to/sessions' ); $app; }; # with custom serializer/deserializer builder { enable 'Session', store => Plack::Session::Store::File->new( dir => '/path/to/sessions', # YAML takes it's args the opposite order serializer => sub { YAML::DumpFile( reverse @_ ) }, deserializer => sub { YAML::LoadFile( @_ ) }, ); $app; }; DESCRIPTION
This implements a basic file based storage for session data. By default it will use Storable to serialize and deserialize the data, but this can be configured easily. This is a subclass of Plack::Session::Store and implements its full interface. METHODS
new ( %params ) The %params can include dir, serializer and deserializer options. It will check to be sure that the dir is writable for you. dir This is the directory to store the session data files in, if nothing is provided then "/tmp" is used. serializer This is a CODE reference that implements the serialization logic. The CODE ref gets two arguments, the $value, which is a HASH reference to be serialized, and the $file_path to save it to. It is not expected to return anything. deserializer This is a CODE reference that implements the deserialization logic. The CODE ref gets one argument, the $file_path to load the data from. It is expected to return a HASH reference. BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan.little@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2009, 2010 Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-07-27 Plack::Session::Store::File(3pm)
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy