I am trying to remove or replace various extraneous characters from a file so that subsequent processes work correctly. The characters that is giving me trouble is the apostrophe '.
The command I 'm trying is
sed 's/\'//g' ${IN_WRK_DIR}/file1 > ${IN_WRK_DIR}/file2
in a Korn script on HP... (8 Replies)
Hi,
I am using the KSH shell. I am facing a problem of escaping apostrophe('), that is occuring in a variable.
I used the following command, but in vain
item=`echo $item|sed 's/'/\'/g'`
this code replaces the occurance of ' in an xml file to apostrophe(') symbol.
The output of... (2 Replies)
Hi Friends,
I need a sed or awk based script to replace a character(alphabet) with ' (Apostrophe). I tried to use the following two commands
1) sed -e 's/a/'/' filename
2) awk '{sub("a","'",$1);print}' filename
but both got failed.
Any help on this.
Thanks in advance.. (3 Replies)
I've got:
$string =~ s/(\w+)/\u\L$1/g;
Which capitalizes each word in the string. The problem is if I have a string with an apostrophe the first letter after it gets capitalized as well.
So Bob's becomes Bob'S.
Thanks for any quick fixes! (4 Replies)
I'm coding using BASH and have a requirement to replace apostrophes with backslash apostrophes. For example below:
I am here 'in my room' ok
Would be changed to:
I am here /'in my room/' ok
The original text is coming from a field in a MySql database and is being used by another process that... (5 Replies)
I have a file:
575G /local/mis/SYBDUMP
I want to remove the G, K, M or T so I can use $1 in awk or sed to do math.
I want to end up with a file containing:
575 /local/mis/SYBDUMP
It should not matter how small or large the numeric numbers are so if 2, 3, 4, or 5 digits etc I want to see... (9 Replies)
Good afternoon all,
I want to ask how to change some letter in my file with other letter in spesific line
eg.
data.txt
1
1
1
0
0
0
0
for example i want to change the 4th line with character 1.
How could I do it by SED or AWK.
I have tried to run this code but actually did not... (3 Replies)
Hi,
I have this text file with these words and I need help with removing words with repeated letter from these lines.
1 ama
5 bib
29 bob
2 bub
5 civic
2 dad
10 deed
1 denned
335 did
1 eeee
1 eeeee
2 eke
8... (4 Replies)
Hello,
I have never ever seen below notation for string substitution.
sed -i -e 's/tttt/pppp'/g /var/bin/czech.sh;
The strange thing for me is the position of the apostrophe. Should it be before the / or after the g?
If I had been writing that command line, I would have chosen below way:... (3 Replies)
hi linux expert
how can i find apostrophe (') symbol in text file by grep? for example for find 'test, the command grep " \'test" * is not useful.
Many Thanks
samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
LEARN ABOUT DEBIAN
html2pdbtxt
html2pdbtxt(1) General Commands Manual html2pdbtxt(1)NAME
html2pdbtxt - HTML to Doc Text converter for Palm Pilots
SYNOPSIS
html2pdbtxt [ -bchars ] [ -ttitle ] [ -uURL ] file.html [ file.txt ]
html2pdbtxt -v
DESCRIPTION
html2pdbtxt converts HTML to text suitable for conversion to a Doc(4) file via txt2pdbdoc(1). If no text filename is given, the generated
text is sent to standard output.
HTML Tags
The following HTML tags (and corresponding ending tags) are recognized: ADDRESS, A NAME, BLOCKQUOTE, BR, CENTER, DIV, DL, DT, H1, H2, H3,
H4, H5, H6, OL, OPTION, PRE, P, SELECT, SCRIPT, STYLE, TABLE, TITLE, UL. In all cases, the most ``reasonable'' thing is done given the
constraints of the Doc(4) format which is essentially plain text. ALT attributes (typically found in IMG tags) have their text extracted
and placed between brackets [like this]. All other HTML tags are stripped.
Character Entities
Both HTML character and numeric (decimal and hexadecimal) entity references are converted to their byte value according to the ISO 8859-1
(Latin 1) character set so they appear properly on the Pilot. For example, ``résumé'' becomes ``resume'' with accented letter
'e's.
Document Title
Unless specified with the -t option, the HTML file is scanned for <TITLE> ... </TITLE> tags and, if found, the title is extracted and put
on line 1 of the generated file.
Bookmarks
Bookmarks are placed into the generated file wherever <A NAME="..."> tags are found in the HTML file.
OPTIONS -bchars Specify the character sequence that is to serve as the bookmark indicator. The default is (*). (See the CAVEATS.)
-ttitle Specify the title of the document that is to appear on line 1 of the generated file overriding any title found inside the HTML
file between <TITLE> ... </TITLE> tags.
-uurl Specify the URL the HTML file supposedly came from and put it on the line after the title, if any, in the generated file.
-v Print the version number to standard output and exit.
EXAMPLE
To convert an HTML file to Doc:
html2pdbtxt -u http://www.wonderland.org/ alice.html alice.txt
txt2pdbdoc "`head -1 alice.txt`" alice.txt alice.pdb
CAVEATS
1. Some Doc readers have a ``feature'' whereby, during the scan for bookmarks phase, they recognize the bookmark sequence of characters
anywhere in the text and not just at the beginning of a line.
2. Some Doc readers do not allow the bookmark sequence to contain the > character since they interpret that as the sequence delimiter,
e.g., <->> will be interpreted as the sequence being merely -.
3. Ordered lists (via the OL tag) are treated as unordered lists (like the UL tag) because it would greatly complicate the code since it
would have to be parsed rather than simple substitutions being performed.
SEE ALSO pdbtxt2html(1), txt2pdbdoc(1), doc(4), pdb(4)
International Standards Organization. ``ISO 8859-1: Information Processing -- 8-bit single-byte coded graphic character sets -- Part 1:
Latin alphabet No. 1.'' 1987.
World Wide Web Consortium. ``Character entity references in HTML 4.0.'' HTML 4.0 Specification, http://www.w3.org/
AUTHOR
Paul J. Lucas <pauljlucas@mac.com>
html2pdbtxt January 21, 2005 html2pdbtxt(1)