I probably could have done this at one time, but, the years and no need has left my scripting skills lacking and I'm unable to work this problem out. https://www.unix.com/images/smilies/frown.gif
:(
Using Linux, have a great many xml files in which there may be multiple occurrence of a line of... (13 Replies)
here is my prob ..
i have a very large text files and i need to locate specific lines, copy them and then replace a single word in the replaced text
example
find all lines that contain '/etc', copy the line immediately below (not at the end of the file) and then replace '/etc' with '/root'... (1 Reply)
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
Hi, I have text file abc.txt. In this file, I have the following data.
Input:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith& Mrs Smith
Mr Smith &Mrs Smith
Output:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith&... (4 Replies)
Hi,
I have a huge text file that contains contents like below.
echo 2VPMUM1CMP01_2011-05-10_18_CPU_Stats_1.txt
awk -F, '{sub ("%","",$8);sum+=100-$8;if (100-$8>max){max=100-$8}}END{printf "max=%.1f%\navg=%.1f%\n",max,sum/NR}'
echo 2VPMUM1CMP01_2011-05-11_10_CPU_Stats_1.txt
awk -F,... (2 Replies)
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Hi All,
I have written a shell script that creates a backup of my MySQL database. The script performs the following functions:
Creates a Backup of the MySQL database
Compresses the Backup
Copies the Backup to a Remote Server
Send an E-Mail displaying the size of the Backup
Removes any... (6 Replies)
I can find and replace text when the delimiters are unique. What I cannot do is replace text using two NON-unique delimiters:
Ex.,
"This html code <text blah >contains <garbage blah blah >. All tags must go,<text > but some must be replaced with <garbage blah blah > without erasing other... (5 Replies)
Discussion started by: bedtime
5 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)