Sponsored Content
Top Forums Shell Programming and Scripting Appending to the first line of a document Post 302168157 by oldhoi on Sunday 17th of February 2008 10:35:09 AM
Old 02-17-2008
Thanks...but what should I be looking at here?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Appending the line number and a seperator to each line of a file ?

Hi, I am a newb as far as shell scripting and SED goes so bear with me on this one. I want to basically append to each line in a file a delimiter character and the line's line number e.g Change the file from :- aaaaaa bbbbbb cccccc to:- aaaaaa;1 bbbbbb;2 cccccc;3 I have worked... (4 Replies)
Discussion started by: pjcwhite
4 Replies

2. Shell Programming and Scripting

Appending line ending with '}" to new line

Hello masters. I have a rather simple problem but its been killing me. I have a file "x" with only 1 line inside it. The line looks something like Now this is only part of the line. Its actually about 4000 characters. What i need to do is whenever there is a "}", i need to append the next... (4 Replies)
Discussion started by: aismann
4 Replies

3. Shell Programming and Scripting

Appending a line in a file after a particular line

Hello, I have got a C file in which I would like to add an include statement of my own. There are already a few include statements and mine should come right after the last existing one (to be neat). With grep I can get the lines containing the word 'include' and I guess I should feed the... (7 Replies)
Discussion started by: maxvirrozeito
7 Replies

4. Shell Programming and Scripting

sed: appending alternate line after previous line

Hi all, I have to append every alternate line after its previous line. For example if my file has following contents line 1: unix is an OS line 2: it is open source line 3: it supports shell programming line 4: we can write shell scripts Required output should be line1: unix is an OS it is... (4 Replies)
Discussion started by: rish_max
4 Replies

5. Shell Programming and Scripting

awk;sed appending line to previous line....

I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one: User1NameLast User1NameFirst User1Address E-Mail:User1email User2NameLast User2NameFirst User2Address... (11 Replies)
Discussion started by: walkerwheeler
11 Replies

6. Shell Programming and Scripting

Appending the first word of each line to the end of each line

Hi Experts, Am relatively new to shell programming so would appreciate some help in this regard. I am looking at reading from a file, line by line, picking the first word of each line and appending it to the end of the line. Any suggestions? INPUT FILE - 3735051 :... (7 Replies)
Discussion started by: hj007
7 Replies

7. UNIX for Dummies Questions & Answers

Parse out part of line in text document

I have an XML file that I am attempting to create a new text document from it with only one of the pieces of data printed. Here's an example: Source: <?xml version="1.0"?> <Reply Success="TRUE"> <ProfileList NrOfProfiles.DWD="645"> <Profile_0 Name="Test" Description="A... (3 Replies)
Discussion started by: Davinator
3 Replies

8. UNIX for Advanced & Expert Users

Issuing a Here Document as a Single Line Command

How can I run a here document on just one line? I ask, because I need to issue it from C++ as a system() or similar command and for security reasons I don't want to write out a shell script file from the program and run it. For example, how could I write: passwd test <<EOF n3wp3ss... (3 Replies)
Discussion started by: BrandonShw
3 Replies

9. UNIX for Dummies Questions & Answers

Script to delete files line by line in .txt document

Friends, I am in need to delete files from a directory on a regular basis. I want to place all the files to be deleted in delete .txt file and require a script to delete files, line by line from this delete.txt file. Please help me with this script as am new to unix scripting. (3 Replies)
Discussion started by: fop4658
3 Replies

10. Shell Programming and Scripting

Remove single-line breaks only in document

Regarding copy/pasted text of copyright-free book from archive.org (link below), in attempt to expand single-line-break paragraph text (not section headings or paragraph breaks) to wider right margin, Justify or Wrap in LIbreOffice is not working, and Find/Replace the paragraph mark ($) wraps all... (2 Replies)
Discussion started by: p1ne
2 Replies
docidx_lang_syntax(n)						Documentation tools					     docidx_lang_syntax(n)

__________________________________________________________________________________________________________________________________________________

NAME
docidx_lang_syntax - docidx language syntax DESCRIPTION
This document contains the formal specification of the syntax of the docidx markup language, version 1 in Backus-Naur-Form. This document is intended to be a reference, complementing the docidx language command reference. A beginner should read the much more informally writ- ten docidx language introduction first before trying to understand either this document or the command reference. FUNDAMENTALS
In the broadest terms possible the docidx markup language is like SGML and similar languages. A document written in this language consists primarily of markup commands, with text embedded into it at some places. Each markup command is a just Tcl command surrounded by a matching pair of [ and ]. Which commands are available, and their arguments, i.e. syntax is specified in the docidx language command reference. In this document we specify first the lexeme, and then the syntax, i.e. how we can mix text and markup commands with each other. LEXICAL DEFINITIONS
In the syntax rules listed in the next section [1] <TEXT> stands for all text except markup commands. [2] Any XXX stands for the markup command [xxx] including its arguments. Each markup command is a Tcl command surrounded by a matching pair of [ and ]. Inside of these delimiters the usual rules for a Tcl command apply with regard to word quotation, nested commands, continuation lines, etc. [3] <WHITE> stands for all text consisting only of spaces, newlines, tabulators and the comment markup command. SYNTAX
The rules listed here specify only the syntax of docidx documents. The lexical level of the language was covered in the previous section. Regarding the syntax of the (E)BNF itself [1] The construct { X } stands for zero or more occurrences of X. [2] The construct [ X ] stands for zero or one occurrence of X. The syntax: index = defs INDEX_BEGIN [ contents ] INDEX_END { <WHITE> } defs = { INCLUDE | VSET | <WHITE> } contents = keyword { keyword } keyword = defs KEY ref { ref } ref = MANPAGE | URL | defs At last a rule we were unable to capture in the EBNF syntax, as it is about the arguments of the markup commands, something which is not modeled here. [1] The arguments of all markup commands have to be plain text, and/or text markup commands, i.e. one of [1] lb, [2] rb, or [3] vset (1-argument form). 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_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, markup, semantic markup CATEGORY
Documentation tools COPYRIGHT
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools 1.0 docidx_lang_syntax(n)
All times are GMT -4. The time now is 03:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy