Sponsored Content
Top Forums Shell Programming and Scripting How to remove html tag which has multiple lines in SHELL? Post 302961493 by RudiC on Monday 30th of November 2015 11:55:57 AM
Old 11-30-2015
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, ...).
 

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
acct(2) 							System Calls Manual							   acct(2)

NAME
acct() - enable or disable process accounting SYNOPSIS
DESCRIPTION
The system call enables or disables the system's process accounting routine. If the routine is enabled, an accounting record is written on an accounting file for each process that terminates. Termination can be caused by one of two things: an call or a signal (see exit(2) and signal(5)). The calling process must have the privilege to use this call. path points to a path name naming the accounting file. The accounting file format is described in acct(4). The accounting routine is enabled if path is nonzero and no errors occur during the system call. It is disabled if path is zero and no errors occur during the system call. When the amount of free space on the file system containing the accounting file falls below a configurable threshold, the system prints a message on the console and disables process accounting. Another message is printed and the process accounting is re-enabled when the space reaches a second configurable threshold. If the size of the process accounting file reaches a configurable limit, records for processes terminating after that point will be silently lost. However, in that case the command would still sense that process accounting is still enabled. This loss of records can be prevented with the command. and are described in acctsh(1M)). Security Restrictions Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
If fails, is set to one of the following values. The file named by path is not an ordinary file. An attempt is being made to enable accounting when it is already enabled. path points to an illegal address. The reliable detection of this error is implementation dependent. Too many symbolic links were encountered in translating the path name. The accounting file path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. One or more components of the accounting file path name do not exist. A component of the path prefix is not a directory. The calling process does not possess the privilege. The named file resides on a read-only file system. path points to a text file which is currently open. SEE ALSO
acct(1M), acctsh(1M), exit(2), acct(4), privileges(5), signal(5). STANDARDS CONFORMANCE
acct(2)
All times are GMT -4. The time now is 07:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy