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
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
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
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
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
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
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
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
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
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 "Hello" equivalent for AIX (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT REDHAT
docbook2texi-spec.pl
DOCBOOK2TEXI-SPEC.PL(1) DOCBOOK2TEXI-SPEC.PL(1)
NAME
docbook2texi-spec.pl - convert DocBook Booksto Texinfo documents
SYNOPSIS
sgmlspl docbook2man-spec.pl
nsgmls [ sgml document ]| sgmlspl docbook2texi-spec.pl [ basename ]
DESCRIPTION
docbook2texi is a sgmlspl spec file that produces GNU Texinfo documents from DocBook documents.
The program reads ESIS produced by nsgmls (or other SGML parsers) from standard input. Currently the document element must be Book, other-
wise the results are undefined.
Its output, the converted Texinfo document, is written to standard output.
The file basename.refs will also be created, which contains all the nodes in the document and their immediate 'child' nodes. As node pro-
cessing always require forward references, docbook2texi must be run twice for each document: the first time to build the references, and
the second to actually generate a valid document.
REQUIREMENTS
The SGMLSpm package from CPAN. This package includes the sgmlspl script that is also needed.
LIMITATIONS
Trying docbook2man on non-DocBook or non-conformant SGML results in undefined behavior. :-)
This program is a slow, dodgy Perl script.
This program does not come close to supporting all the possible markup in DocBook, and may produce wrong output in some cases with sup-
ported markup.
TO DO
o How the hell do you represent a backslash () in Texinfo!!@? I've tried \ but TeX complains about it.
o Fix breakages found in the test documents.
o Add new element handling and fix existing handling. Be robust.
o Make it faster. I think most of the speed problems so far is with parsing ESIS. Rewrite SGMLS.pm with C and/or get input directly from
SP.
o There are some dependencies on elements occurring when they are actually optional (according to the DTD). We need to fix that (prefer-
ably) or prominently state the requirements.
o Allow other more common document elements.
o Separate out node referencing to a separate script. Not only would it make it faster/easier to maintain because it's separate from the
main code, but also I would like it to evolve into an automatic DocBook ToC generator.
COPYRIGHT
Copyright (C) 1998-1999 Steve Cheng <steve@ggi-project.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) any later version.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, please write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
05 February 2003 DOCBOOK2TEXI-SPEC.PL(1)