The awk that I have (on OS X) only processes the first character in RS, but the following seems to do what you want (and should work with any version of awk, except use /usr/xpg4/bin/awk or nawk if you are using a Solaris/SunOS system):
This User Gave Thanks to Don Cragun For This Post:
Hi All,
I have been working on something that doesn't seem to have a clear regex solution and I just wanted to run it by everyone to see if I could get some insight into the method of solving this problem.
I have a flat text file that contains billing records for users, however the records... (5 Replies)
111111111100000000001111111111
123232323200000010001114545454
232435424200000000001232131212
342354234301000000002323423443
232435424200000000001232131212
2390898994200000000001238908092
This is the record format.
From 11th position to 20th position in a record there are 0's occuring,and... (6 Replies)
Hi Gents,
I have a file 1 like this
1 1000 20
2 2000 30
3 1000 40
5 1000 50
And I have other file 1 like
2 1
I would like to get from the file 1 the complete line which are in file 2, the key to compare is the column 2 then output should be.
2 2000 30.
I was trying to get it... (5 Replies)
Hi
I have xml file with multiple records and would like to extract records from xml with specific condition if specific tag is present extract entire row otherwise skip .
<logentry revision="21510">
<author>mantest</author>
<date>2015-02-27</date>
<QC_ID>334566</QC_ID>... (12 Replies)
Hello everybody,
I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings..
The original XML files contain the source code for... (12 Replies)
Hi
I have two lists of patterns named A and B consisting of around 200 entries in each and I want to extract all the sentences from a big text file which match atleast one pattern from both A and B.
For example, pattern list A consists of :
ama
ani
ahum
mari
...
...
and pattern... (1 Reply)
awk 'NR==FNR{arr;next} $0 in arr' /tmp/Data_mismatch.sh /prd/HK/ACCTCARD_20160115.txt
edit by bakunin: seems that one CODE-tag got lost somewhere. i corrected that, but please check your posts more carefully. Thank you. (5 Replies)
more data.txt
i need this exacted from data.txt
This is the command i tried
sed -n "/Start_of_DISK_info:\/u/,/End_of_DISK_info:\/u/p" data.txtBut, unfortunately it does not do an exact match. Instead, it prints text between both these strings /u & /u/tmp like below.
i need this... (6 Replies)
Hi everyone,
So i'm struggling with an xml (log file) where we get information about some devices, so the logfile is filled with multiple "blocks" like that.
Based on the <devId> i want to extract this part of the xml file. If possible I want it to have an script for this, cause we'll use... (5 Replies)
Discussion started by: Pouky
5 Replies
LEARN ABOUT DEBIAN
gjots2docbook
GJOTS2DOCBOOK(1) General Commands Manual GJOTS2DOCBOOK(1)NAME
gjots2docbook - Convert a gjotsfile to DOCBOOK (on stdout)
SYNOPSIS
gjots2docbook -a|-b [ -e ] [ -P ] [ -p ] [ gjotsfile ]
DESCRIPTION
gjots2docbook converts a gjotsfile into DOCBOOK XML.
gjots2docbook uses awk(1) to perform the conversion.
gjots2docbook does not create them so the first element in the file should contain any <bookinfo> or <artheader> element. Similarly, <bib-
liographic> elements are not created. In fact the output is very simplistic with item titles in the gjotsfile being converted to chapter or
section headings in DOCBOOK. There is no reason why your gjotsfile should not contain valid DOCBOOK XML - and that is why the -e and -p op-
tions are provided.
If the file does not start with <?xml ...> then appropriate lines will be added as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc_type PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN">
If properly installed, the docbook utilities can then be used to create HTML, man, ps, pdf etc files eg:
gjots2docbook -b ~/.gjotsfile >gjotsfile.xml
docbook2pdf gjotsfile.xml
It may be necessary to fine-tune the docbook formatting to access all features.
OPTIONS -a makes a DOCBOOK article
-b makes a DOCBOOK book
-e don't encode special characters eg < -> <
-p don't change blank lines to </para><para> markers
-P first section is a preface rather than a chapter (book only)
AUTHOR
Written by Bob Hepple <bhepple@freeshell.org>
http://bhepple.freeshell.org/gjots
COPYRIGHT
Copyright (c) 2002 Robert Hepple
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PAR-
TICULAR PURPOSE.
SEE ALSO gjots(1), gjots2html(1), docbook2gjots(1)GJOTS2DOCBOOK(1)