Sponsored Content
Top Forums Shell Programming and Scripting How to remove html tag which has multiple lines in SHELL? Post 302961494 by YuhuiFeng on Monday 30th of November 2015 12:00:26 PM
Old 11-30-2015
Quote:
Originally Posted by RudiC
This /</{:L;N;/>/!bL;d}; is a loop, entered when a < is encountered, appending next lines until an > is read, then deleting the pattern space. It is far from bullet proof, not accounting for e.g. nested tags, but should give you an idea on how you could proceed.

If you want further help you need to be way more specific (details, samples, error msgs, ...).
The error is that
bL: Event not found.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies

2. Shell Programming and Scripting

how to use html tag in shell scripting

Hai friends I have a small doubt.. how can we use html tag in shell scripting code : echo "<html>" echo "<body>" echo " welcome to peace world " echo "</body>" echo "</html>" output displayed like this: <html> <body> welcome to peace world </body> </html> (5 Replies)
Discussion started by: jrex1983
5 Replies

3. Shell Programming and Scripting

command to remove attribute of an html tag

Is there any shell command to clean an html tag of its attributes. For ex <p align ="center"> with <p>. Thanks for your help!! (2 Replies)
Discussion started by: parshant_bvcoe
2 Replies

4. Shell Programming and Scripting

How to remove some xml tag lines using shell script

I have existing XML file as below, now based on input string in shell script on workordercode i need to create a seprate xml file for e.g if we pass the input string as 184851 then it find the tag data from <workOrder>..</workOrder> and write to a new file and similarly next time if i pass the... (3 Replies)
Discussion started by: balrajg
3 Replies

5. Shell Programming and Scripting

shell command to remove some XML tag is needed

Hi all, I have a file which i have to remove some line from it, the lines that i have to remove from my file is as below: </new_name></w"s" langue="Fr-fr" version="1.0" encoding="UTF-8" ?> <New_name> and it is finding at the middle of my file, is there any command line in linux to do it or do... (10 Replies)
Discussion started by: id_2pc
10 Replies

6. Shell Programming and Scripting

How to remove string inside html tag <a>

Does anybody know how i can remove string from <a> tag? There are several hundred posts in a few forums that need to be cleaned up. The precise situation is ---------- <a href="http://mydomain.com/cgi-bin/anyboard.cgi?fvp=/family/sexuality_and_spirituality/&cmd=rA&cG=43"> ------------- my... (6 Replies)
Discussion started by: georgi58
6 Replies

7. Shell Programming and Scripting

How can I remove some xml tag lines using shell script?

Hi All, My name is Prathyu and I am working as a ETL develper. I have one requirement to create a XML file based on the provided XSD file. As per the Datastage standards Key(repeatable) field does not contain any Null values so I am inserting some dummy tag line to that XML file. ... (14 Replies)
Discussion started by: Prathyu
14 Replies

8. Shell Programming and Scripting

Search for a html tag and print the entire tag

I want to print from <fruits> to </fruits> tag which have <fruit> as mango. Also i want both <fruits> and </fruits> in output. Please help eg. <fruits> <fruit id="111">mango<fruit> . another 20 lines . </fruits> (3 Replies)
Discussion started by: Ashik409
3 Replies

9. Shell Programming and Scripting

Creating multiple xml tag lines in a file

Hi All, Can someone tell me how can we create same xml tag lines based on the number of lines present in other file and replace the Name variable vaule present in other file. basically I have this xml line <typ:RequestKey NameType="RIC" Name="A1" Service="DDA"/> and say I... (4 Replies)
Discussion started by: Optimus81
4 Replies

10. UNIX for Beginners Questions & Answers

Multiline html tag parse shell script

Hello, I want to parse the contents of a multiline html tag ex: <html> <body> <p>some other text</p> <div> <p class="margin-bottom-0"> text1 <br> text2 <br> <br> text3 </p> </div> </body> (15 Replies)
Discussion started by: SorcRR
15 Replies
ARBTT-STATS(1)							Program references						    ARBTT-STATS(1)

NAME
arbtt-stats - generate statistics from the arbtt data samples SYNOPSIS
arbtt-stats [OPTION...] DESCRIPTION
arbtt-stats reads the samples that were recorded so far by arbtt-capture from the log file, filters them according to the users specifications and generates one or more reports from the data. When run without any options, --total-time is assumed. The order in which filters (--exclude, --only, --also-inactive and --filter) and reports are passed to the program is irrelevant: All filters given on the command line are active for all reports. OPTIONS
-h, -?, --help shows a short summary of the available options, and exists. -V, --version shows the version number, and exists. --logfile FILE logfile to use instead of ~/.arbtt/capture.log --categorizefile categorize file to use instead of ~/.arbtt/categorize.cfg Filtering options -x TAG, --exclude TAG Ignore any data samples that have been assigned this tag or category. To distinguish tags and categories, the latter have to be entered followed by a colon. Can be given more than once. -o TAG, --only TAB Ignore any data samples that have not been assigned this tag. To distinguish tags and categories, the latter have to be entered followed by a colon. Can be given more than once. --also-inactive by default, arbtt-stats ignores any samples which have been assigned the tag inactive. This flag disables this behaviour. -f CONDITION, --filter CONDITION Only consider samples matching the given condition, which follows the same syntax as in categorize.cfg (Nonterminal Cond in the formal grammar specification found in the user guide). Report options -m PERCENTAGE, --min-percentage PERCENTAGE Ignore tags whose percentage is less than the value specified here. Default percentage: 1%. --output-exclude TAG Skip this tag or category when printing statistics. Only affects the reports --total-time and --category. To distinguish tags and categories, the latter have to be entered followed by a colon. Can be given more than once. --output-only TAG Prints statistics only for the specified tag or category. Only affects the reports --total-time and --category. To distinguish tags and categories, the latter have to be entered followed by a colon. Can be given more than once. --output-format FORMAT Specify the report output format, may be one of: text, csv (comma-separated values), tsv (TAB-separated values). Default format: text. Reports -i, --information Various bits of information about the recorded data, such as total time recorded, number of records etc. In this report, "time recorded" is the sum of all samples, including inactive and those that are disabled by the filter, while "time selected" is the sum of the samples that are matched by the given filters. -t, --total-time For all tags, print the part of the selected time with this tag applied to, both as an absolute value and a percentage of the selected time. -c CATEGORY, --category CATEGORY For the given category, give the textual equivalent of a pie chart: For each possible value of the category, including one for "no tag of this category present", give the absolute time and fraction. Entries which are not displayed because of the option --min-percentage are aggregated. --each-category This is just a shortcut for a series of --category options, one for each category found in the data. --intervals [TAG|CATEGORY:] This report lists all periods of consecutive time intervals where the given tag has been applied to, or where the given category has the same value. To distinguish tags and categories, the latter have to be entered followed by a colon. This report will give wrong results if an activity has been carried out at the end of a session and right at the beginning, as the intermediate time is thought to be part of the interval. Inactive times while arbtt-capture is running will separate the results as expected. EXAMPLES
Some useful examples of what you can do with arbtt-stats are provided here: # Only consider the time when I was programming in Haskell arbtt-stats -o Editing-Haskell # Tell me what evolution folders I spend my time in when I actually do # work with e-Mail arbtt-stats -o Program:evolution -c Evo-Folder # Generate statistics about the last hour arbtt-stats -f '$sampleage < 1:00' FILES
~/.arbtt/capture.log binary file, storing the arbtt data samples ~/.arbtt/categorize.cfg specification of the arbtt categorizer syntax. A detailed description is given in the section called "Configuring the arbtt categorizer (arbtt-stats)" SEE ALSO
See the arbtt manual for more information and the arbtt hackage page[1] for newer versions of arbtt. AUTHORS
Joachim Breitner <mail@joachim-breitner.de> Main author of arbtt Sergey Astanin <s.astanin@gmail.com> Contributor Martin Kiefel <mk@nopw.de> Contributor Muharem Hrnjadovic <muharem@linux.com> Contributor NOTES
1. arbtt hackage page http://www.hackage.org/package/arbtt arbtt manual 04/07/2012 ARBTT-STATS(1)
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy