Sponsored Content
Top Forums Shell Programming and Scripting AWK: Help inserting records between various matches Post 302708919 by Euler2 on Tuesday 2nd of October 2012 11:56:36 AM
Old 10-02-2012
That did it! Thanks I knew it had to be simpler than I what I was doing.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Inserting records from flat file to db table

I have 20000 numbers present in a file in each line like 25663, 65465, 74579, 56446, .. .. I have created a table in db with single number column in it. create table testhari (no number(9)); I want to insert all these numbers into that table. how can i do it? can anybody please... (4 Replies)
Discussion started by: Hara
4 Replies

2. Shell Programming and Scripting

awk to count pattern matches

i have an awk statement which i am using to count the number of occurences of the number ,5, in the file: awk '/,5,/ {count++}' TRY.txt | awk 'END { printf(" Total parts: %d",count)}' i know there is a total of 10 matches..what is wrong here? thanks (16 Replies)
Discussion started by: npatwardhan
16 Replies

3. UNIX for Advanced & Expert Users

Inserting a line before the line which matches the patter

Hi Is there any command where we can insert a line "2|||" before every line starting with "3|" my input is as follows 1|ETG|12345 3|79.58|||GBP|| 1|ETG|12345 3|79.58|||GBP|| 1|ETG|12345 2|EN_GB||Electrogalvanize 0.5 m2 ( Renault ) 1|ETG|12345 3|88.51|||GBP|| desired output... (10 Replies)
Discussion started by: laxmi131
10 Replies

4. Shell Programming and Scripting

Changing exact matches with awk from subfields

To give you some context of my issue the following is some sample dummy data. The field delimiter is "<-->". The 4th field is going to be tags for my notes. The tags should always be unique and sorted alphabetically. 1<-->01/20/12<-->01/20/12<-->1st note<-->1st note<-NL->2 lines... (4 Replies)
Discussion started by: adamreiswig
4 Replies

5. Shell Programming and Scripting

Records Inserting

Hi Guys , I Need to insert records into a file just above the last row . like i have a file which has records as shown below : 00012919 7836049 S 00012920 7836049 S 00012921 3828157 Y 00012922 3828157 Y 00012923 3828157 S T005290070331000012923 i want to... (1 Reply)
Discussion started by: robert89
1 Replies

6. Shell Programming and Scripting

Display all the matches lines in one line using awk

Please can you let me know how to print all the matching lines from a file in one single line using awk. Thanks I have the following data in the input file data1 voice2 voice1 speech1 data2 data3 ... ... voice4 speech2 data4 and the output should be as follows data1 data2... (4 Replies)
Discussion started by: Sudhakar333
4 Replies

7. Shell Programming and Scripting

awk with range but matches pattern

To match range, the command is: awk '/BEGIN/,/END/' but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this: awk '/BEGIN/,/END/ if only in that range there is /pattern/' Thanks (8 Replies)
Discussion started by: zorrox
8 Replies

8. Shell Programming and Scripting

Number of matches and matched pattern(s) in awk

input: !@#$%2QW5QWERTAB$%^&* The string above is not separated (or FS=""). For clarity sake one could re-write the string by including a "|" as FS as follow: !|@|#|$|%|2QW|5QWERT|A|B|$|%|^|&|* Here, I am only interested in patterns (their numbers are variable between records) containing... (16 Replies)
Discussion started by: beca123456
16 Replies

9. Shell Programming and Scripting

awk to output specific matches in file

Using the attached file, the below awk command results in the output below: I can not seem to produce the desired results and need some expert help. Thank you :). awk -F'' ' { id += $4 value += $5 occur++ } END{ printf "%-8s%8s%8s%8s\n", "Gene", "Targets", "Average Depth", "Average... (3 Replies)
Discussion started by: cmccabe
3 Replies

10. Shell Programming and Scripting

awk Index to get position matches pattern

Input data as below (filetest.txt): 1|22 JAN Minimum Bal 20.00 | SAT 2|09 FEB Extract bal 168.00BR | REM 3|MIN BAL | LEX Output should be: ( If there is Date & Month in 2nd field of Input file, It should be seperated else blank. If There is Decimal OR Decimal & Currency in last of the 2nd... (7 Replies)
Discussion started by: JSKOBS
7 Replies
docidx_intro(n) 						Documentation tools						   docidx_intro(n)

__________________________________________________________________________________________________________________________________________________

NAME
docidx_intro - docidx introduction DESCRIPTION
docidx (short for documentation tables of contents) stands for a set of related, yet different, entities which are working together for the easy creation and transformation of keyword-based indices for documentation. These are [1] A tcl based language for the semantic markup of a keyword index. Markup is represented by Tcl commands. [2] A package providing the ability to read and transform texts written in that markup language. It is important to note that the actual transformation of the input text is delegated to plugins. [3] An API describing the interface between the package above and a plugin. Which of the more detailed documents are relevant to the reader of this introduction depends on their role in the documentation process. [1] A writer of documentation has to understand the markup language itself. A beginner to docidx should read the more informally written docidx language introduction first. Having digested this the formal docidx language syntax specification should become understand- able. A writer experienced with docidx may only need the docidx language command reference from time to time to refresh her memory. While a document is written the dtp application can be used to validate it, and after completion it also performs the conversion into the chosen system of visual markup, be it *roff, HTML, plain text, wiki, etc. The simpler dtplite application makes internal use of docidx when handling directories of documentation, automatically generating a proper keyword index for them. [2] A processor of documentation written in the docidx markup language has to know which tools are available for use. The main tool is the aforementioned dtp application provided by Tcllib. The simpler dtplite does not expose docidx to the user. At the bottom level, common to both applications, however sits the package doctoools::idx, providing the basic facilities to read and process files containing text in the docidx format. [3] At last, but not least, plugin writers have to understand the interaction between the doctools::idx package and its plugins, as described in the docidx plugin API reference. RELATED FORMATS
docidx does not stand alone, it has two companion formats. These are called doctoc and doctools, and they are for the markup of tables of contents, and general documentation, respectively. They are described in their own sets of documents, starting at the doctoc introduction and the doctools introduction, respectively. BUGS, IDEAS, FEEDBACK This document, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have. SEE ALSO
docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref, doctoc_intro, doctools::idx, doc- tools_intro KEYWORDS
index, keyword index, markup, semantic markup COPYRIGHT
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools 1.0 docidx_intro(n)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy