Sponsored Content
Full Discussion: GAWK/GREP Equivalent
Top Forums Shell Programming and Scripting GAWK/GREP Equivalent Post 302720193 by metallica1973 on Tuesday 23rd of October 2012 02:27:39 PM
Old 10-23-2012
Many thanks,

That is one hell of a line using GAWK.Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

gawk HELP

I have to compare records in two files. It can be done using gawk/awk but i am unable to do it. Please help me File1 ABAAAAAB BC asa sa ABAAABAA BC bsa sm ABBBBAAA BC bxz sa ABAAABAB BC csa sa ABAAAAAA BC dsa sm ABBBBAAB BC dxz sa File 2 ABAAAAAB BC aas ba ABAAAAAB BC asa sa... (6 Replies)
Discussion started by: sandeep_hi
6 Replies

2. Shell Programming and Scripting

perl equivalent to grep -c

Guess the subject lines says it all. What is the perl equivalent to grep -c -c, --count Suppress normal output; instead print a count of match- ing lines for each input file. With the -v, --invert- match option (see below), count non-matching lines. ... (6 Replies)
Discussion started by: popeye
6 Replies

3. Shell Programming and Scripting

Gawk Help

Hi, I am using the script to print the portion of the file containing a particular string. But it is giving error "For Reading (No such file or directory). I am using cygwin as unix simulator. cat TT35*.log | gawk -v search="12345678" ' /mSOriginating /,/disconnectingParty/ { ... (1 Reply)
Discussion started by: vanand420
1 Replies

4. Shell Programming and Scripting

AIX equivalent to GNU grep's -B and -A [print lines after or before matching lines]

Hi folks I am not allowed to install GNU grep on AIX. Here my code excerpt: grep_fatal () { /usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP" } Howto the same on AIX based machine? from manual GNU grep ‘--after-context=num’ Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

5. Shell Programming and Scripting

awk (gawk) grep & columns

Hi, I'm working with gawk (on DOS) today. A goal is: find a string for-instance '123', cut a line in two columns and write second one. The problem is: command line works OK, awk file doesn't. But I would like to work with file because there are many strings to find. input: line command: awk... (4 Replies)
Discussion started by: frajer
4 Replies

6. Shell Programming and Scripting

SED equivalent for grep -w -f with pattern having special characters

I'm looking for SED equivalent for grep -w -f. All I want is to search a list of patterns from a file. Also If the pattern doesn't match I do not want "null returned", rather I would prefer some text as place holder say "BLANK LINE" as I intend to process the output file based on line number. ... (1 Reply)
Discussion started by: novice_man
1 Replies

7. Shell Programming and Scripting

grep -v equivalent in perl

I have to do grep -v in a perl script. I want to exclude blank lines and lines having visitor. #grep -v visitor abc.txt |grep '.' file:abc.txt 1340 not booked 16D:D9 tourist 8 1341 not booked 16C:D4 tourist 25 1342 not booked 16D:C4 visitor 7 1343 not booked 01C:D9 visitor 6 1344... (4 Replies)
Discussion started by: dynamax
4 Replies

8. Shell Programming and Scripting

sed Equivalent for awk/grep

Any equivalent command using awk or grep? sed -n "/^$(date --date='10 minutes ago' '+%b %_d %H:%M')/,\$p" /abc.log (7 Replies)
Discussion started by: timmywong
7 Replies

9. SCO

Need help with gawk

I am trying to use gawk to search a file and put the second value of the string into a string. gawk -F: '$1~/CXFR/ {print $2}' go.dat Below is the file 'go.dat' ==================== HOME :/ CTMP :/tmp CUTL :/u/rdiiulio/bin CWRK :/u/work CXFR :/u/xfer ... (1 Reply)
Discussion started by: trolley
1 Replies

10. AIX

Need grep -v Equivalent for AIX

Need grep -v "Hello" equivalent for AIX (9 Replies)
Discussion started by: mohtashims
9 Replies
POE::Filter::IRC::Compat(3pm)				User Contributed Perl Documentation			     POE::Filter::IRC::Compat(3pm)

NAME
POE::Filter::IRC::Compat - A filter which converts POE::Filter::IRCD output into POE::Component::IRC events SYNOPSIS
my $filter = POE::Filter::IRC::Compat->new(); my @events = @{ $filter->get( [ @lines ] ) }; my @msgs = @{ $filter->put( [ @messages ] ) }; DESCRIPTION
POE::Filter::IRC::Compat is a POE::Filter that converts POE::Filter::IRCD output into the POE::Component::IRC compatible event references. Basically a hack, so I could replace POE::Filter::IRC with something that was more generic. Among other things, it converts normal text into thoroughly CTCP-quoted messages, and transmogrifies CTCP-quoted messages into their normal, sane components. Rather what you'd expect a filter to do. A note: the CTCP protocol sucks bollocks. If I ever meet the fellow who came up with it, I'll shave their head and tattoo obscenities on it. Just read the "specification" (docs/ctcpspec.html in this distribution) and you'll hopefully see what I mean. Quote this, quote that, quote this again, all in different and weird ways... and who the hell needs to send mixed CTCP and text messages? WTF? It looks like it's practically complexity for complexity's sake -- and don't even get me started on the design of the DCC protocol! Anyhow, enough ranting. Onto the rest of the docs... METHODS
"new" Returns a POE::Filter::IRC::Compat object. Takes no arguments. "clone" Makes a copy of the filter, and clears the copy's buffer. "get" Takes an arrayref of POE::Filter::IRCD hashrefs and produces an arrayref of POE::Component::IRC compatible event hashrefs. Yay. "get_one_start", "get_one" These perform a similar function as "get" but enable the filter to work with POE::Filter::Stackable. "put" Takes an array reference of CTCP messages to be properly quoted. This doesn't support CTCPs embedded in normal messages, which is a brain- dead hack in the protocol, so do it yourself if you really need it. Returns an array reference of the quoted lines for sending. "debug" Takes an optinal true/false value which enables/disables debugging accordingly. Returns the debug status. "chantypes" Takes an arrayref of possible channel prefix indicators. "identifymsg" Takes a boolean to turn on/off the support for CAPAB IDENTIFY-MSG. AUTHOR
Chris 'BinGOs' Williams SEE ALSO
POE::Filter::IRCD POE::Filter POE::Filter::Stackable perl v5.14.2 2011-12-07 POE::Filter::IRC::Compat(3pm)
All times are GMT -4. The time now is 06:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy