I'm working with a set of files where I'm trying to remove a set of characters from specific fields. The files are comma-delimited, and the characters I want to remove include:
- open parentheses - (
- close parentheses - )
- space followed by a dollar sign - $
I don't want to remove every... (1 Reply)
Hello,
I am newbie in awk. I have just started learning it.
1) I have input file which looks like:
{4812 4009 1602 2756 306} {4814 4010 1603 2757 309} {8116 9362 10779 }
{10779 10121 9193 10963 10908} {1602 2756 306 957 1025} {1603 2757 307}
and so on.....
2) In output:
a)... (10 Replies)
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Hello everyone,
Maybe somebody could help me with an awk script.
I have this input (field separator is comma ","):
547894982,M|N|J,U|Q|P,98,101,0,1,1
234900027,M|N|J,U|Q|P,98,101,0,1,1
234900023,M|N|J,U|Q|P,98,54,3,1,1
234900028,M|H|J,S|Q|P,98,101,0,1,1
234900030,M|N|J,U|F|P,98,101,0,1,1... (2 Replies)
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Dear all,
I have a data like below (n of rows=400,000) and I want to extract the rows with certain strings. I use code below. It works if there is not too many strings for example n of strings <5000. while I have 90,000 strings to extract. If I use the egrep code below, I will get error:
... (3 Replies)
Would like to compare 2 XML Strings which has certain known fields changed. For example, Date field will always have differences. When comparing both strings, skip/mask all the occurring Date Field's `DtField1` and `DtField2`
Note: these are not formatted xml format.
File1:
... (1 Reply)
can anyone help me!!!! How to I parse the CSV file
file name : abc.csv (csv file) The above file containing data like
abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
LEARN ABOUT DEBIAN
pdf2txt
PDF2TXT(1) PDFMiner Manual PDF2TXT(1)NAME
pdf2txt - extracts text contents of PDF files
SYNOPSIS
pdf2txt [option...] file...
DESCRIPTION
pdf2txt extracts text contents from a PDF file. It extracts all the text that is to be rendered programmatically, i.e. text represented as
ASCII or Unicode strings. It cannot recognize text drawn as images that would require optical character recognition. It also extracts the
corresponding locations, font names, font sizes, writing direction (horizontal or vertical) for each text portion. You need to provide a
password for protected PDF documents when its access is restricted. You cannot extract any text from a PDF document which does not have
extraction permission.
OPTIONS -o file
Specifies the output file name. The default is to print the extracted contents to standand output in text format.
-p pageno[,pageno,...]
Specifies the comma-separated list of the page numbers to be extracted. Page numbers start at one. By default, it extracts text from
all the pages.
-c codec
Specifies the output codec.
-t type
Specifies the output format. The following formats are currently supported:
text
Text format. This is the default.
html
HTML format. It is not recommended.
xml
XML format. It provides the most information.
tag
"Tagged PDF" format. A tagged PDF has its own contents annotated with HTML-like tags. pdf2txt tries to extract its content streams
rather than inferring its text locations. Tags used here are defined in the PDF Reference, Sixth Edition[1] (S10.7 "Tagged PDF").
-D writing-mode
Specifies the writing mode of text outputs:
lr-tb
Left-to-right, top-to-bottom.
tb-rl
Top-to-bottom, right-to-left.
auto
Determine writing mode automatically
-M char-margin, -L line-margin, -W word-margin
These are the parameters used for layout analysis. In an actual PDF file, text portions might be split into several chunks in the
middle of its running, depending on the authoring software. Therefore, text extraction needs to splice text chunks. In the figure
below, two text chunks whose distance is closer than the char-margin is considered continuous and get grouped into one. Also, two lines
whose distance is closer than the line-margin is grouped as a text box, which is a rectangular area that contains a "cluster" of text
portions. Furthermore, it may be required to insert blank characters (spaces) as necessary if the distance between two words is greater
than the word-margin, as a blank between words might not be represented as a space, but indicated by the positioning of each word.
Each value is specified not as an actual length, but as a proportion of the length to the size of each character in question. The
default values are char-margin = 1.0, line-margin = 0.3, and W = 0.2, respectively.
-n
Suppress layout analysis.
-A
Force layout analysis for all the text strings, including text contained in figures.
-V
Enable detection of vertical writing.
-s scale
Specifies the output scale. This option can be used in HTML format only.
-m n
Specifies the maximum number of pages to extract. By default, all the pages in a document are extracted.
-P password
Provides the user password to access PDF contents.
-d
Increase the debug level.
EXAMPLES
Extract text as an HTML file whose filename is output.html:
$ pdf2txt -o output.html samples/naacl06-shinyama.pdf
Extract a Japanese HTML file in vertical writing:
$ pdf2txt -c euc-jp -D tb-rl -o output.html samples/jo.pdf
Extract text from an encrypted PDF file:
$ pdf2txt -P mypassword -o output.txt secret.pdf
SEE ALSO dumppdf(1)AUTHORS
Jakub Wilk <jwilk@debian.org>
Wrote this manual page for the Debian system.
Yusuke Shinyama <yusuke@cs.nyu.edu>
Author of PDFMiner and its original HTML documentation.
NOTES
1. PDF Reference, Sixth Edition
http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf
pdf2txt 08/24/2011 PDF2TXT(1)