09-11-2007
Retaining spaces within words
Denn,
It is eliminating all the spaces that exists between the words.
eg., if I have a data like this
"Rajiv | Rajiv Rajiv Rajiv |Rajiv Rajiv"
If I use the command suggested by you will result in the output
"Rajiv|RajivRajivRajiv|RajivRajiv"
I need the output in the following format
"Rajiv|Rajiv Rajiv Rajiv|Rajiv Rajiv"
Thanks,
Rajiv
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to merge data from more than one file and I am using
while read line_record
do
field1=`echo $line_record | awk -F "," '{ print $1 }'`
echo $line_record >> $outFile
if
then
while read new_linerec
do
echo $new_linerec... (3 Replies)
Discussion started by: skrakesh
3 Replies
2. UNIX for Dummies Questions & Answers
Hi Experts,
I have a 2 GB flat file which have unicode field, some of them are blanks and its size is 4000 character. In the existing system SED command removes the spaces. Because of this field itself....it is taking almost three days to complete the file processing. I removed sed and... (0 Replies)
Discussion started by: RcR
0 Replies
3. Programming
I am very new to C programming.
How could I write a C program that could count the characters, words, spaces, and punctuations in a text file?
Any help will be really appreciated. I am doing this as part of my C learning exercise.
Thanks,
Ajay (4 Replies)
Discussion started by: ajay41aj
4 Replies
4. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
5. Shell Programming and Scripting
Hey all,
Fist post, so be kind... I have written an expect script which logs into a terminal and gathers several screens of information. Unfortunately the log file gives me all the special escape and control characters from the terminal. I am hoping to use a combination of shell scripting, sed,... (1 Reply)
Discussion started by: mpacer
1 Replies
6. Shell Programming and Scripting
Hi All,
I have written a C program to solve this problem but I am eager to know whether the same output can be obtained using sed or awk?
This is the input:
star
ferry
computer
symbol
prime
time
This is the output:
starferry
ferrycomputer
computersymbol
symbolprime
primetime (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
7. Shell Programming and Scripting
I have a file that contains the schedule for a tournament with 41 teams. The team names have spaces in them. I would like to search for each teams schedule and then save that to that teams file
For example
Team name: "Team Two"
I would like to search for all the games for "Team Two" and... (8 Replies)
Discussion started by: knijjar
8 Replies
8. Shell Programming and Scripting
Hi all,
Is there a sed/awk cmd that will remove blank space from between words in a particular field, replacing with a single space?
Field containing 'E's in the example below:
Example input file:
AAAAA AA|BBBB|CCCCCCC|DDDDDD |EEEE EEEEEE| FFF FFFFF|
... (6 Replies)
Discussion started by: dendright
6 Replies
9. Shell Programming and Scripting
Hi
I have strings like these :
Vengeance mitt
Men Vengeance gloves
Women Quatro Windstopper Etip gloves
Quatro Windstopper Etip gloves
Girls Thermobite hooded jacket
Thermobite Triclimate snow jacket
Boys Thermobite Triclimate snow jacket
and I would like to get the lower case words at... (2 Replies)
Discussion started by: louisJ
2 Replies
10. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
LEARN ABOUT DEBIAN
hocr2djvused
HOCR2DJVUSED(1) hocr2djvused manual HOCR2DJVUSED(1)
NAME
hocr2djvused - hOCR to djvused script converter
SYNOPSIS
hocr2djvused [option...]
DESCRIPTION
hocr2djvused reads a hOCR[1] file (as produced by OCRopus[2] or Cuneiform[3] or Tesseract[4]) from the standard input and converts it to a
djvused script.
OPTIONS
Text segmentation options
-t lines, --details lines
Record location of every line. Don't record locations of particular words or characters.
-t words, --details=words
Record location of every line and every word. Don't record locations of particular characters.
This is the default.
-t chars, --details=chars
Record location of every line, every word and every character.
--word-segmentation=simple
Consider each non-empty sequence of non-whitespace characters a single word.
This is the default, despite being linguistically incorrect.
--word-segmentation=uax29
Use the Unicode Text Segmentation[5] algorithm to break lines into words.
This options break assumptions of some DjVu tools that words are separated by spaces, and therefore is it not recommended.
Other options
--rotation=n
Assume that DjVu pages are rotated by n degrees.
--page-size=widthxheight
Specifies that page size is width pixels x height pixels.
This option is required for hOCR generated by Cuneiform (< 0.8) and superfluous otherwise.
--html5
Use a HTML5 parser[6], which is more robust but slower than the default parser.
--version
Output version information and exit.
-h, --help
Display help and exit.
SEE ALSO
ocrodjvu(1), djvused(1)
AUTHOR
Jakub Wilk <jwilk@jwilk.net>
Author.
NOTES
1. hOCR
http://docs.google.com/View?docid=dfxcv4vc_67g844kf
2. OCRopus
http://ocropus.googlecode.com/
3. Cuneiform
http://launchpad.net/cuneiform-linux
4. Tesseract
http://tesseract-ocr.googlecode.com/
5. Unicode Text Segmentation
http://unicode.org/reports/tr29/
6. HTML5 parser
http://www.whatwg.org/specs/web-apps/current-work/#html-parser
hocr2djvused 0.7.9 03/10/2012 HOCR2DJVUSED(1)