01-10-2011
You want to comments out lines, try sed, using N to get the entire element in /<\([^ >]*\).*<\/\1>/, and then wrap it in comment markup s/.*/<!-- & -->/ or similar.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to put multiline comments in a shell script like /* Some code */ in C language? (3 Replies)
Discussion started by: skyineyes
3 Replies
2. Shell Programming and Scripting
I have a file shows as below. I would like to put # before CCCC. so how to do in Solaris. Here sed doesnot support -i
AAAA
BBBB
CCCCC
DDDDD
EEEEE
FFFFFF (1 Reply)
Discussion started by: madhusmita
1 Replies
3. Shell Programming and Scripting
Hi All,
I am looking for a awk/shell which can find an element named REFERENCE in a XML file and check whether it is empty or not.
If there is no value in the REFERENCE element then correspondingly move the file to some other folder.
The Unix server is AIX version 4.
Any inputs... (9 Replies)
Discussion started by: karansachdeva
9 Replies
4. Shell Programming and Scripting
Hi,
I would like to get rid of all comment in an xml file by grep or sed command:
The content seem like this:
<!-- ab cd
ef gh
ij kl -->
Anyone can help?
Thanks and Regards (3 Replies)
Discussion started by: RonLii
3 Replies
5. Shell Programming and Scripting
I'm trying to write a script to help automate some VERY tedious manual tasks.
I have groups of fairly large XML files (~3mb+) that I need to edit.
I need to look through the files and parse the XML looking for a certain flag contained in a field. If I find this flag (an integer value) I need... (4 Replies)
Discussion started by: J-Hon
4 Replies
6. Shell Programming and Scripting
Hi All,
I have been working on something that doesn't seem to have a clear regex solution and I just wanted to run it by everyone to see if I could get some insight into the method of solving this problem.
I have a flat text file that contains billing records for users, however the records... (5 Replies)
Discussion started by: Jerrad
5 Replies
7. Shell Programming and Scripting
hi ,
i m having a html file and this file looks like this
<ssl>
<name>PIA</name>
<enabled>true</enabled>
<listen-port>39370</listen-port>
</ssl>
<log>
<name>PIA</name>
</log>
<execute-queue>
<name>weblogic.kernel.Default</name>
... (7 Replies)
Discussion started by: becksram123
7 Replies
8. Shell Programming and Scripting
(1) Yes but how is this block different from the other 24? You will need this information in order to identify and replace this block correctly (out of the 25).
Ans: The 1st line and last line of this block are unique from other block.
The 1st line is “rem Subset Rows (&&tempName.*) and
The... (1 Reply)
Discussion started by: Zaheer.mic
1 Replies
9. Shell Programming and Scripting
Hello!
I'd like to modify custom values in a XML config file between comment tags using bash script.
<feature>
<keyboardshortcut>C-m</keyboardshortcut>
<option1>disabled</option2>
<option2>enabled</option2>
</feature>
<!-- bash script features START -->
<feature>
... (2 Replies)
Discussion started by: prism1
2 Replies
10. Shell Programming and Scripting
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
Discussion started by: annacreek
8 Replies
LEARN ABOUT OSX
doctoc_lang_syntax
doctoc_lang_syntax(n) Documentation tools doctoc_lang_syntax(n)
__________________________________________________________________________________________________________________________________________________
NAME
doctoc_lang_syntax - doctoc language syntax
DESCRIPTION
This document contains the formal specification of the syntax of the doctoc markup language, version 1.1 in Backus-Naur-Form. This document
is intended to be a reference, complementing the doctoc language command reference. A beginner should read the much more informally writ-
ten doctoc language introduction first before trying to understand either this document or the command reference.
FUNDAMENTALS
In the broadest terms possible the doctoc 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 doctoc 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 doctoc 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:
toc = defs
TOC_BEGIN
contents
TOC_END
{ <WHITE> }
defs = { INCLUDE | VSET | <WHITE> }
contents = { defs entry } [ defs ]
entry = ITEM | division
division = DIVISION_START
contents
DIVISION_END
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
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro
KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup, semantic markup
CATEGORY
Documentation tools
COPYRIGHT
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>
doctools 1.0 doctoc_lang_syntax(n)