01-24-2009
"where the no of lines containing "<branch value= " is increasing " Means??
Can you provide with the expected output of the input you provided.??
Is below what u expect??
$ cat inphtml | sed -n '/<template_file name="Approve External" path="core\/approve\/bin"/,/<\/template_file>/ {
> /<branch value="\/dev36\/AREA\/" include="yes"><\/branch>/p
> }
> '
Output:
<branch value="/dev36/AREA/" include="yes"></branch>
----------------------
$ cat inphtml | sed -n '/<template_file name="Approve External" path="core\/approve\/bin"/,/<\/template_file>/ {
> /<branch value=/p
> }
> '
Output:
<branch value="all" include="no"></branch>
<branch value="/devAREA/" include="yes"></branch>
<branch value="/upgrade_test/AREA/include="yes"></branch>
<branch value="/dev4/AREA/" include="yes"></branch>
<branch value="/dev36/AREA/" include="yes"></branch>
<branch value="/dev05/" include="yes"></branch>
<branch value="/mandsmoney/AREA/" include="yes"></branch>
Last edited by amicon007; 01-24-2009 at 02:08 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to print the lines after 2nd line irrespective of the number of lines in file
if the file contents are like below
----------
root:!:0:0::/root:/usr/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:... (6 Replies)
Discussion started by: ram1729
6 Replies
2. Shell Programming and Scripting
I have a file a.xml
some portion of the file is given below.But the file format is same.
CTYPE available_templates SYSTEM './available_templates.dtd'>
<available_templates>
<template_file name="Approve External" path="core/approve/bin"
<command_list>
<command... (1 Reply)
Discussion started by: millan
1 Replies
3. Shell Programming and Scripting
Hi all,
Sorry for the title, I was unsure how to word my issue. I'll get right to the issue. In my text file, I need to find all lines with the same data in the first field. Then I need to create a file with the matching lines merged into one. So my original file will look something like... (4 Replies)
Discussion started by: rstev39147
4 Replies
4. UNIX for Dummies Questions & Answers
Hello all, new to unix and have just found the forum.
I think I will be here quite often, and hope that in time i will be able to provide soem help, role on not being a newbie anymore :)
I have a question which iI am hoping someone could help me with.
If i have a file with lines in in thus... (8 Replies)
Discussion started by: grom
8 Replies
5. Shell Programming and Scripting
Hi All,
I am having an abc.txt , which contains some digits
Eg:abc.txt
145
566
355
I want write shellscript in suchway that if any digit is greter than 1000 then it shuld display " text files contain digit, which is greater than 1000"
Please help me to do so
Thanks.. (8 Replies)
Discussion started by: pspriyanka
8 Replies
6. UNIX for Advanced & Expert Users
I have two files
a.txt
b.txt
I want to find a line in a.txt and replace by another line from b.txt
a.txt
asfsdfsfsfdfsf
asfwererfgdgf
wrerwetretfdg
b.txt
werdfgdfgf
werergfdgd
sfdfgfgfgfgg
i want to replace the 1st line of a.txt by 1st line of b.txt
i want out put as (5 Replies)
Discussion started by: rammm
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
8. UNIX for Advanced & Expert Users
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
9. UNIX for Dummies Questions & Answers
How do you write a script to ignore all lines except the --- dash lines and then remove --- dashes from the data in a text file?
Also how do you separate data in a text file with a tab (for example, column1 (software) and column2 (date) ) ?
Here is my scripts : I am getting errors in... (3 Replies)
Discussion started by: dellanicholson
3 Replies
10. Shell Programming and Scripting
I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies
LEARN ABOUT DEBIAN
aemakeflic
aemakeflic(1) General Commands Manual aemakeflic(1)
NAME
aemakeflic - produce an animation from an aewan document
SYNOPSIS
aemakeflic [-f {less|sh}] [-N] [-b] [-d <delay>] input.ae [outputfile.ext]
DESCRIPTION
This utility will make an ascii animation out of an aewan document. It can currently produce animations in two formats: a shellscript
which, when executed, will display the animation and a "less movie" intended to be "played" on the very popular 'less' output pager -- that
is, the user will see the animation as he pages down through the file in an appropriate window size.
Each layer in the aewan document is interpreted as one frame of the animation. Layer transparency and compositing are not used: each layer
becomes a frame.
OPTIONS
-f specifies output format - can "sh" for a shellscript or "less" for a "less movie"
-N omit the initial instructions that are normally included in the resulting file. The instructions will orient the user as to how to
play the file.
-b disables output of color (only characters will be printed).
-d delay
specifies the delay between frames (for shellscript only), given in milliseconds.
AUTHORS
This program is part of the Aewan Ascii Art Editor package. See aewan(1) for author information.
LICENSE
Copyright (c) 2004-2005 Bruno Takahashi C. de Oliveira. All rights reserved.
This program is licensed under the GNU General Public License, version 2 or, at your option, any later version. For full license informa-
tion, please refer to the COPYING file that accompanies the program.
SEE ALSO
aewan(1), aewan(5), aecat(1)
aemakeflic (Aewan Ascii Art Editor) September 2005 aemakeflic(1)