I am not a whiz at awk and very unsure about the aplication of awk solve my problem. I was hoping for some quick pointers so I can figure this out.
I have a file that looks like so:
Now, I want this to be changed into:
Notice that I want to change each unicode value to its HTML entity form, while adding a BR tag at the end of each line so it is formatted appropriately in HTML.
A simple find replace does not work since I have to work around already embedded HTML tags. Any help is much apreciated!
Last edited by pinnochio; 04-12-2010 at 05:33 PM..
Reason: Updated source
Hi guys , i would want to count the concurrences of the 0A hex char in a text file , then if no matches i need to add a 0A at the end of the line.
Any ideas?
thx.Regards (1 Reply)
I have an RPM that I am trying to install and it keeps coming back with:
I know I could kill the bird by throwing a "yum install *perl*" at it, but this seems like hurling a skyscraper at an ant...
any better suggestions? (2 Replies)
Hi,
I have learned some of the Unix commands a way back and not sure of how to code them when needed in certain way, especially sed command. Here is my situation. I have an xml file with several tags. most of the tags start on the same line and end on the same line. However, data for some tags... (8 Replies)
Hi,
I have a non-ascii character (Ŵ), which can be represented in UTF-8 encoding as equivalent hex value (\xC5B4). Is there a function in unix to convert this hex value back to display the charcter ? (10 Replies)
Hello Can Any1 help me.
I want to replace a specific character string inside a file at a specific location with a particular character with the help of a command or a shell script.
The tr command replaces a specific character with another for all the occurences of that character in the file.
I... (5 Replies)
OK This one has me stumped. I have the following line,
program name - the program description that can also contain a hyphen - character.
I'm need to separate the "program name" from the program description.
I've tried using an array function with the - as delimiter, but I ran into a... (2 Replies)
Hi All,
My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ','
This has to be done for all the hexstring char* is NULL.
Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
This might be a dummy question, but is there a command in UNIX that compare two strings character-by-character and display the difference?
---------- Post updated at 11:25 AM ---------- Previous update was at 10:32 AM ----------
Or probably what I'm looking is how to break a string into... (3 Replies)
Hi,
Is there really a difference between these two, std::hex and ios::hex??
I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true?
Thanks (0 Replies)
Hello guys,
I'm trying to extract all the expressions between the following tags: <b></b> from a HTML file.
This is how it looks: big lines containing several dozens expressions (made of 1,2,3,4,6 or even 7 words) I would like to extract:
<b>bla ble</b>bla ble</td><tr valign="top"><td... (3 Replies)