Sponsored Content
Top Forums Shell Programming and Scripting Sed or Grep to delete line containing patter plus extra line Post 302433637 by rocketman88 on Wednesday 30th of June 2010 06:59:03 AM
Old 06-30-2010
Thanks

Works well, thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed: delete regex line and next line if blank

Hi, I want to write a sed script which from batiato: batiato/giubbe: pip_b.2.txt pip_b.3.txt pip_b.3mmm.txt bennato: bennato/peterpan: 123.txt consoli: pip_a.12.txt daniele: (2 Replies)
Discussion started by: one71
2 Replies

2. UNIX for Advanced & Expert Users

Inserting a line before the line which matches the patter

Hi Is there any command where we can insert a line "2|||" before every line starting with "3|" my input is as follows 1|ETG|12345 3|79.58|||GBP|| 1|ETG|12345 3|79.58|||GBP|| 1|ETG|12345 2|EN_GB||Electrogalvanize 0.5 m2 ( Renault ) 1|ETG|12345 3|88.51|||GBP|| desired output... (10 Replies)
Discussion started by: laxmi131
10 Replies

3. Shell Programming and Scripting

Grep a string in a range and delete the line

Hi, i need to delete a lines after searching a particular string but this searching should only happen after the 4th line.. basically imagine a file like this From: abcd.yahoo.com To: cdeb.yahoo.com Subject: hi all sdfsd sadasd asdasd dfsdf From: abcd.yahoo.com To:... (3 Replies)
Discussion started by: depakjan
3 Replies

4. Shell Programming and Scripting

'sed' command shows extra line

Here is an interesting problem that I am seeing when using 'sed'. The goal is to print out the names of the Oracle SID's on a system and here is the command I am using: ps -ef|grep ora|grep pmon|awk '{print $NF}'|sed 's/ora_pmon_//' The output of the command after the awk is this: ... (3 Replies)
Discussion started by: soleil4716
3 Replies

5. Shell Programming and Scripting

USING sed to delete a line

Please let me know wat would be sed command to delete any partcular line from a file and also moving lines below it to up. ie wen line #9 is deleted data in line #10 should move to #9 and so on. (2 Replies)
Discussion started by: fidelis
2 Replies

6. Shell Programming and Scripting

how to delete extra character in a line?

And I want to delete the characters longer than 20 for each line start with #. The other lines should remain the same. I think this can be done by sed. Could anyone help me with this? Thanks! my input file: #ZP_05494889.1_Clostridium_papyrosolvens... (3 Replies)
Discussion started by: ritacc
3 Replies

7. Shell Programming and Scripting

Delete line breaks and extra spaces between patterns

Hi, if in between strings "<section" and "</section>" across multiple lines there occurs the string "ole-present", delete all line breaks and replace any tabs or multiple spaces with a single space. Looking for an AWK or SED solution. Thank you. <section ... status = "ole-present" ...... (2 Replies)
Discussion started by: pioavi
2 Replies

8. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

9. Shell Programming and Scripting

sed for appending a line before a pattern and after another patter.

Hi All, I'm appending a line before a pattern and after another pattern(;) but omitting the first pattern - same as if comes duplicates before the second pattern. Also, I'm adding a word before the first pattern - Here is my file select blah blah hello select blah blah ; select... (6 Replies)
Discussion started by: Mannu2525
6 Replies

10. Shell Programming and Scripting

Sed/grep: check if line exists, if not add line?

Hello, I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files. is there a way to speed things up? Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
LaTeXML::Global(3pm)					User Contributed Perl Documentation				      LaTeXML::Global(3pm)

NAME
"LaTeXML::Global" - global exports used within LaTeXML, and in Packages. SYNOPSIS
use LaTeXML::Global; DESCRIPTION
This module exports the various constants and constructors that are useful throughout LaTeXML, and in Package implementations. Global state "$STATE;" This is bound to the currently active LaTeXML::State by an instance of LaTeXML during processing. Tokens "$catcode = CC_ESCAPE;" Constants for the category codes: CC_BEGIN, CC_END, CC_MATH, CC_ALIGN, CC_EOL, CC_PARAM, CC_SUPER, CC_SUB, CC_IGNORE, CC_SPACE, CC_LETTER, CC_OTHER, CC_ACTIVE, CC_COMMENT, CC_INVALID, CC_CS, CC_NOTEXPANDED. [The last 2 are (apparent) extensions, with catcodes 16 and 17, respectively]. "$token = Token($string,$cc);" Creates a LaTeXML::Token with the given content and catcode. The following shorthand versions are also exported for convenience: T_BEGIN, T_END, T_MATH, T_ALIGN, T_PARAM, T_SUB, T_SUPER, T_SPACE, T_LETTER($letter), T_OTHER($char), T_ACTIVE($char), T_COMMENT($comment), T_CS($cs) "$tokens = Tokens(@token);" Creates a LaTeXML::Tokens from a list of LaTeXML::Token's "$tokens = Tokenize($string);" Tokenizes the $string according to the standard cattable, returning a LaTeXML::Tokens. "$tokens = TokenizeInternal($string);" Tokenizes the $string according to the internal cattable (where @ is a letter), returning a LaTeXML::Tokens. "@tokens = Explode($string);" Returns a list of the tokens corresponding to the characters in $string. "StartSemiVerbatim(); ... ; EndSemiVerbatim();" Desable disable most TeX catcodes. Numbers, etc. "$number = Number($num);" Creates a Number object representing $num. "$number = Float($num);" Creates a floating point object representing $num; This is not part of TeX, but useful. "$dimension = Dimension($dim);" Creates a Dimension object. $num can be a string with the number and units (with any of the usual TeX recognized units), or just a number standing for scaled points (sp). "$mudimension = MuDimension($dim);" Creates a MuDimension object; similar to Dimension. "$glue = Glue($gluespec);" "$glue = Glue($sp,$plus,$pfill,$minus,$mfill);" Creates a Glue object. $gluespec can be a string in the form that TeX recognizes (number units optional plus and minus parts). Alternatively, the dimension, plus and minus parts can be given separately: $pfill and $mfill are 0 (when the $plus or $minus part is in sp) or 1,2,3 for fil, fill or filll. "$glue = MuGlue($gluespec);" "$glue = MuGlue($sp,$plus,$pfill,$minus,$mfill);" Creates a MuGlue object, similar to Glue. "$pair = Pair($num1,$num2);" Creates an object representing a pair of numbers; Not a part of TeX, but useful for graphical objects. The two components can be any numerical object. "$pair = PairList(@pairs);" Creates an object representing a list of pairs of numbers; Not a part of TeX, but useful for graphical objects. Error Reporting "Fatal($message);" Signals an fatal error, printing $message along with some context. In verbose mode a stack trace is printed. "Error($message);" Signals an error, printing $message along with some context. If in strict mode, this is the same as Fatal(). Otherwise, it attempts to continue processing.. "Warn($message);" Prints a warning message along with a short indicator of the input context, unless verbosity is quiet. "NoteProgress($message);" Prints $message unless the verbosity level below 0. Generic functions "Stringify($object);" Returns a short string identifying $object, for debugging. Works on any values and objects, but invokes the stringify method on blessed objects. More informative than the default perl conversion to a string. "ToString($object);" Converts $object to string; most useful for Tokens or Boxes where the string content is desired. Works on any values and objects, but invokes the toString method on blessed objects. "Equals($a,$b);" Compares the two objects for equality. Works on any values and objects, but invokes the equals method on blessed objects, which does a deep comparison of the two objects. AUTHOR
Bruce Miller <bruce.miller@nist.gov> COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. perl v5.10.1 2009-06-11 LaTeXML::Global(3pm)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy