Sponsored Content
Top Forums Shell Programming and Scripting Find a text and if condition matches then replace it Post 303022945 by singhhe on Sunday 9th of September 2018 01:45:15 PM
Old 09-09-2018
Many Thanks! Works like a charm.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find and replace text

test 100 abc test 134 bcd test 356 cdf test 831 dfg test 720 fgh Please advise how can I replace the abc, bcd....with ABC, BCD.... (1 Reply)
Discussion started by: bobo
1 Replies

2. UNIX for Dummies Questions & Answers

Find and replace text PLEASE HELP

Dear friends please help, I have a large data file with few hundred lines. A small example is shown below: datafile is a file with few hundred lines with the third column has many different character stings: test 100 abc test 134 bcd test 356 cdf test 831 dfg test 720 fgh I need to... (6 Replies)
Discussion started by: bobo
6 Replies

3. Shell Programming and Scripting

find text but replace a text beside it

I have an html file that looks like this (this is just a part of the html file): <td colspan="3" rowspan="1" style="text-align: center; background-color: rgb(<!-- IDENTIFIER1 -->51, 255, 51);"><small><!-- IDENTIFIER2 -->UP</small></td> This is to automatically update the status of the... (4 Replies)
Discussion started by: The One
4 Replies

4. Shell Programming and Scripting

Need to find a string, check the next line, and if it matches certain criteria, replace it with a s

Hey Fellas. I am new to scripting. I have searched through the forums and found a lot of good info, but I can't seem to get any of it to work together. I am trying to find a particular sting in a file, and if the next string matches certain criteria, replace it with a string from a csv... (6 Replies)
Discussion started by: midniteslice
6 Replies

5. Shell Programming and Scripting

Find and add/replace text in text files

Hi. I would like to have experts help on below action. I have text files in which page nubmers exists in form like PAGE : 1 PAGE : 2 PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
Discussion started by: lodhi1978
6 Replies

6. Shell Programming and Scripting

Replace text inside XML file based on condition

Hi All, I want to change the name as SEQ_13 ie., <Property Name="Name">SEQ_13</Property> when the Stage Type is PxSequentialFile ie., <Property Name="StageType">PxSequentialFile</Property> :wall: Input.XML <Main> <Record Identifier="V0S13" Type="CustomStage" Readonly="0">... (3 Replies)
Discussion started by: kmsekhar
3 Replies

7. Emergency UNIX and Linux Support

Find a line using a condition and replace a string in that line

Hello, I have a 100 line code. I have given a sample of it below: ABC*654654*1*54.54*21.2*87*1*654654654654 CCC*FS*FS*SFD*DSF GGG*FGH*CGB*FBDFG*FGDG ABC*654654*1*57.84*45.4*88*2*6546546545 CCC*WSF*SG*FGH*GHJ ADA*AF*SFG*DFGH*FGH*FGTH I need to select the line starting with "ABC" its... (3 Replies)
Discussion started by: nithins007
3 Replies

8. Shell Programming and Scripting

Send email if the condition matches

Hello everyone, I am trying to create function or script to send email from an address book file. Here is the file format i have, Susan:Miller:M:123 Main Street:Philadelphia:PA:17101:666-645-6666:Susan.Miller@gmail.com:07/12/1979 Robert:Langan:S:32 North Avenue:San... (5 Replies)
Discussion started by: asistant
5 Replies

9. Shell Programming and Scripting

Shell Script @ Find a key word and If the key word matches then replace next 7 lines only

Hi All, I have a XML file which is looks like as below. <<please see the attachment >> <?xml version="1.0" encoding="UTF-8"?> <esites> <esite> <name>XXX.com</name> <storeId>10001</storeId> <module> ... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies

10. Shell Programming and Scripting

Grepping only if condition matches

Dear Friends, I have a flat file which is as follows $cat sample 123,456,1,1,1,1 sdfas,345,1,1,1,1 dfgd,234,2,3,4,1 ggffgr,234,4,3,2,1 jkhu,354.1,1,1,1 $ I want to get output of only those lines which has '1' in 3 to 5 position. So I want output as follows 123,456,1,1,1,1... (8 Replies)
Discussion started by: anushree.a
8 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 05:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy