Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tag(3tcl) [linux man page]

tag(3tcl)																 tag(3tcl)

NAME
tag - Manipulate tagged files SYNOPSIS
tag option ?arg arg ...? DESCRIPTION
The tag procedure provides a number of options for manipulating tagged files. COMMANDS
tag readfile filename Reads the file with the given filename and returns a list where each list element is a tag record, which is represented by a list of label-value pairs, or label-value-endlabel triples. The tag header is the first element returned. tag writefile filename list Takes a list in the format used internally in tcl programs for tagged data and writes it as a tagged file. tag extract list tests Takes a list in tagged format, and a list of conditions, and returns a new list in tagged format which contains those tag records which match the conditions. The tests is a list of test items, each of which is a list of the form { labelname condition matchvalue } The conditions are == String equals != String not equal <= Less than or equal -in Is the test value a member of the list given as the matchvalue -contains Does the match value contain the test value as a case insensitive substring. -earlier Date earlier -later Date later - dates are in ISO format (yyyy-mm-dd [hh:mm:ss]). -exists Does the label exist in this record. BUGS
tag readfile reads the whole file into memory before turning it into a list. Should be more memory efficient. The -earlier and -later comparisons require TCL8.3 AUTHOR
John Lines (john@paladin.demon.co.uk) July 3, 2000 tag(3tcl)

Check Out this Related Man Page

tag(3tcl)                                                                                                                                tag(3tcl)

NAME
tag - Manipulate tagged files SYNOPSIS
tag option ?arg arg ...? DESCRIPTION
The tag procedure provides a number of options for manipulating tagged files. COMMANDS
tag readfile filename Reads the file with the given filename and returns a list where each list element is a tag record, which is represented by a list of label-value pairs, or label-value-endlabel triples. The tag header is the first element returned. tag writefile filename list Takes a list in the format used internally in tcl programs for tagged data and writes it as a tagged file. tag extract list tests Takes a list in tagged format, and a list of conditions, and returns a new list in tagged format which contains those tag records which match the conditions. The tests is a list of test items, each of which is a list of the form { labelname condition matchvalue } The conditions are == String equals != String not equal <= Less than or equal -in Is the test value a member of the list given as the matchvalue -contains Does the match value contain the test value as a case insensitive substring. -earlier Date earlier -later Date later - dates are in ISO format (yyyy-mm-dd [hh:mm:ss]). -exists Does the label exist in this record. BUGS
tag readfile reads the whole file into memory before turning it into a list. Should be more memory efficient. The -earlier and -later comparisons require TCL8.3 AUTHOR
John Lines (john@paladin.demon.co.uk) July 3, 2000 tag(3tcl)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

errpt display option?

HI When I run errpt, since there is such a long list of them I cant seem to see the most recent. There must be some kind of tag for this? I checked man but had no luck. Any help? Many thanks. IN. (2 Replies)
Discussion started by: Incremental
2 Replies

2. Shell Programming and Scripting

test with two conditions (OR)

Hi there, I'm very surprised that I can't find this myself and I'm sorry to bother you with such a stupid question. I just want to write a test with one condition or another one. I want either the first argument to be equal to 'this' or the second argument to be equal to 'that'. ~$ cat test ((... (3 Replies)
Discussion started by: chebarbudo
3 Replies

3. Shell Programming and Scripting

Sed command to clean xml tag

Hi, Can someone help me come up with a generic sed command to clean a tag off its attributes? For eg. Input String - <tag attrib=new>This String</tag> should undergo a sed transformation to get Output String - <tag >This String</tag> This works - echo "<tag attrib=new>This</tag>" |... (3 Replies)
Discussion started by: iamwha1am
3 Replies

4. UNIX for Dummies Questions & Answers

replace characters with spaces between tag

I have a file where in some records are having the <Start> and <End> tag. There is data before the start tag , between the tages and after the End tag. I want to replace everything between the start & end tag with equivalent spaces. Input File afsdfaksddfs<start>12678<end>sgdfgdfsf... (6 Replies)
Discussion started by: varunrbs
6 Replies

5. Shell Programming and Scripting

extract specific line if the search pattern is found

Hi, I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses. My Source file <Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT ... (3 Replies)
Discussion started by: Sekar1
3 Replies

6. UNIX for Dummies Questions & Answers

Help on finding a number

Hello, Here is my question. I have a file which contains the html values. I have to find the decimal number from it. It is tagged around >68.74<. Please help me on it.. alt='' ><\/td>\n\t\t<td align=\"right\" class='data_table_text data_table_conv_averages_text' \ style='padding-right:... (1 Reply)
Discussion started by: sathyaonnuix
1 Replies

7. Shell Programming and Scripting

How to Split File based on String?

hi , The scenario is like this, i have a large text files (max 5MB , about 5000 file per day ), Inside almost each line of this file there is a tag 3100.2.22.1 (represent Call_Type) , i need to generate many filess , each one with distinct (3100.2.22.1 Call_Type ) , and one more file to... (3 Replies)
Discussion started by: OTNA
3 Replies

8. Shell Programming and Scripting

Send mail using html tag pre

Need assistance. Trying to send a test.csv file using html tag <PRE> </PRE>. Used to work without any issue . But now gets me and stdin issue. Please give me any suggestions #!/usr/bin/ksh export MAILTO=" <userid>@a.com" export SUBJECT="Test mail " ( echo "Subject: $SUBJECT" echo... (6 Replies)
Discussion started by: ajayram_arya
6 Replies

9. Shell Programming and Scripting

Contextual search and replace in a tagged file

Dear all, I have a large tagged training file in Hindi for Parts of Speech. When I tagged the file, I inadvertently classified Pronouns and Adjectives as one single category. This has resulted in ambiguity. An example from English will make this clear. This is his. This is his book. The... (2 Replies)
Discussion started by: gimley
2 Replies

10. Shell Programming and Scripting

Extracting data between two tag pairs

In a huge log file (43MB, 43k lines) I am trying to extract data between two tag pairs on same line and export it to a file so I can pull it into Excel for a report. One Pair is <Text>data I need</Text> Other pair follows on same line and is <TimeStamp>more data I need</TimeStamp> I would need... (2 Replies)
Discussion started by: NanookArctic
2 Replies

11. UNIX for Beginners Questions & Answers

Replacing tag based on condition

Hi All, I am having a file like below. The file will having information about the records.If you see the file the file is header and data. For example it have 1 men tag and the tag id will be come after headers. The change is I want to convert All pets tag from P to X. I did a sed like below... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

12. What is on Your Mind?

New 'member_project' tag with DarkGreen (was Magenta) Color

Hi wisecracker, Thank you for posting this. Reference: Q: Is SQRT(n) possible in a POSIX... I think I will create a new tag for these kind of "tutorials" or "fun projects" similar to the "solved" tag which changes the color to blue; but the "member_project" tag would turn the color to... (14 Replies)
Discussion started by: Neo
14 Replies