Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Create html <ui> <li> by parsing text file Post 303040320 by alcresio on Saturday 26th of October 2019 12:50:27 PM
Old 10-26-2019
Yes Neo,
my code works, but it's really ugly! :-)

It was written by hand just to give an idea. The formatting code make clearer the future steps. Tnx!


I stiil working on basics of scripting, May I need some time to learn.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies

2. Shell Programming and Scripting

Create a html file if a process is running??

Hi All, I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML. If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it? How do I do... (1 Reply)
Discussion started by: Hangman2
1 Replies

3. Shell Programming and Scripting

Create multiple text file from a single text file on AIX

Hi I need to create multiple text files from onc text file on AIX. The data of text files is as below: ********************************************** ********************************************** DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009 Copyright (c) 1982,... (11 Replies)
Discussion started by: lodhi1978
11 Replies

4. Shell Programming and Scripting

Linux Script create index.html file

I need a script that can do this: A script that searches all directories and subdirectories for .html files When a .html file is found it creates a index.html file in that folder. It then edits the index.html file and inserts links to all of the .html files that are in that folder into the... (5 Replies)
Discussion started by: seashell11
5 Replies

5. Programming

Parsing a Text file using C++

I was trying to parse the text file, which will looks like this ###XYZABC#### ############ int = 4 char = 1 float = 1 . . ############ like this my text file will contains lots of entries and I need to store these entries in the map eg. map.first = int and map.second = 4 same way I... (5 Replies)
Discussion started by: agupta2
5 Replies

6. Shell Programming and Scripting

Script to create a text file whose content is the text of another files

Hello everyone, I work under Ubuntu 11.10 (c-shell) I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment. I will show you an example: - On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Discussion started by: tenteyu
1 Replies

7. Shell Programming and Scripting

Parsing HTML, get text between 2 HTML tags

Hi there, I'm quite new to the forum and shell scripting. I want to filter out the "166.0 points". The results, that i found in google / the forum search didn't helped me :( <a href="/user/test" class="headitem menu" style="color:rgb(83,186,224);">test</a><a href="/points" class="headitem... (1 Reply)
Discussion started by: Mysthik
1 Replies

8. Shell Programming and Scripting

awk parsing file to create a database

Hi Guys, I have a list a hotels stored in many different text files. This list is kept in the following format: 20/03 Hotel: The Bear Hotel Honey Street Woodstock UK Tel:+44-xxxxxx Rate: 100 21/03 Hotel: The Bush Hotel Nice Street Farnham (4 Replies)
Discussion started by: freddie50
4 Replies

9. Linux

Parsing - export html table data as .csv file?

Hi all, Is there any out there have a brilliant idea on how to export html table data as .csv or write to txt file with separated comma and also get the filename of link from every table and put one line per rows each table. Please see the attached html and PNG of what it looks like. ... (7 Replies)
Discussion started by: lxdorney
7 Replies

10. UNIX for Beginners Questions & Answers

Copy the content from txt file and create a html file

I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)
Discussion started by: DevAakash
7 Replies
XmStringParseText(library call) 										   XmStringParseText(library call)

NAME
XmStringParseText -- A function that converts a character string to a compound string SYNOPSIS
#include <Xm/Xm.h> XmString XmStringParseText( XtPointer text, XtPointer *text_end, XmStringTag tag, XmTextType type, XmParseTable parse_table, Cardinal parse_count, XtPointer call_data); DESCRIPTION
XmStringParseText converts characters specified in text to corresponding components in the returned compound string. The resulting compound string consists of at least one locale or charset tag component and a series of XmString text components and other components. The conver- sion proceeds according to the parse information contained in parse_table. See the Motif Programmer's Guide for more information about parsing and parse tables. o If type is XmCHARSET_TEXT, the associated tag is interpreted as a charset name. If tag has a value of NULL, a charset component whose value is the result of mapping XmFONTLIST_DEFAULT_TAG is created. o If type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, the associated tag is interpreted as a language environment name. If tag has a value of NULL, a locale component with a value of _MOTIF_DEFAULT_LOCALE is created. If type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, tag must be NULL or _MOTIF_DEFAULT_LOCALE. XmStringParseText also scans the string for characters that have matches in parse_table. Whenever a match is found, the text up to that point is concatenated with the mapped component. text Specifies the NULL-terminated string containing characters of a type determined by type. This is updated to point to after the last character scanned. text_end Specifies a pointer into text. If a NULL is supplied to the text_end parameter, then XmStringParseText parses text until NULL is encountered, or until it reaches a point in text where it is directed to stop (for example, by a parse_proc). Otherwise, the value supplied to the text_end parameter is the pointer into text where parsing is to stop, and the returned character is the one where parsing did stop. tag Specifies the tag to be used in creating the result. The type of string tag created (charset or locale) depends on the text type and the passed in tag value. If the tag value is NULL and if type indicates that a charset string tag should be created, the string tag has the value that is the result of mapping XmFONTLIST_DEFAULT_TAG. If type indicates a locale string tag, the string tag has the value _MOTIF_DEFAULT_LOCALE. type Specifies the type of text and the tag type. If a locale tag should be created, type has a value of either XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT. If type has value of XmCHARSET_TEXT, a charset tag will be created. parse_table Specifies the parse table to be used in scanning for characters to be converted to other compound string components. parse_count Specifies the number of entries in parse_table. call_data Specifies data to be passed to the parse procedures. RETURN
Returns a new compound string. The function allocates space to hold the returned compound string. When the application no longer needs the returned compound string, the application should call XmStringFree. RELATED
XmString(3), XmStringFree(3), XmParseTable(3), XmParseMapping(3). XmStringParseText(library call)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy