Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Replacing tag based on condition Post 303003366 by arunkumar_mca on Wednesday 13th of September 2017 08:14:19 AM
Old 09-13-2017
Always Home is the end.I made that check in the other script. Please ignore my below email the above thing worked. Thanks a lot

Thanks a lot. The tags are always delimited by comma and the end is not always home. But I can make the change to include number of the count like below.


Code:
N44361,
New Insu,
5, --- new count  added 
Men,1,
Women,57,
Kids,65,
Pets,11,
Home,1,
M11,
WP770059634,WP770059639,WP770059644,P770059654,P770059655,P770059656,W770059657,W770059658,W770059659,W770059660,
W770059661,W770059662,W770059663,W770059664,W770059665,W770059666,W770059667,W770059668,W770059669,W770059670,
W770059671,W770059672,W770059673,W770059674,W770059675,W770059676,W770059677,W770059678,W770059679,W770059680,
W770059681,W770059682,W770059683,W770059684,W770492470,W770492472,W770492474,W770755150,W770755151,W770492477,
W770755128,W770755131,W770755132,W770755135,W770755139,W770755140,W770755141,W770755142,W770755143,W770755144,
W770755149,W770755148,W770755147,W770755146,W770755153,W770755154,W5002,
K70059634,K70059639,K70059644,K70059654,K70059655,K70059656,K70059657,K70059658,
K70059659,K70059660,K70059661,K70059662,K70059663,K70059664,K70059665,K70059666,
K70059667,K70059668,K70059669,K70059670,K70059671,K70059672,K70059673,K70059674,
K70059675,K70059676,K70059677,K70059678,K70059679,K70059680,K70059681,K70059682,
K70059683,K70059684,K70492470,K70492472,K70492474,K70755150,K70755151,K70492477,
K70755128,K70755131,K70755132,K70755135,K70755139,K70755140,K70755141,K70755142,
K70755143,K70755144,K70755149,K70755148,K70755147,K70755146,K70755153,K70755154,
K5002,K5007,K5012,K5017,K5022,K5027,K5032,K5037,
K5042,
X300102,X2200,X2201,X2202,X2203,X2204,X2205,X2206,X2207,X2208,
X2209,
P1917079,


Last edited by arunkumar_mca; 09-13-2017 at 09:22 AM.. Reason: new changes
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract value inside <text> tag for a particular condition.

Hi All! I have obtained following output from a tool "pdftohtml" :: So, my input is as under: <text top="246" left="160" width="84" height="16" font="3">Business purpose</text> <text top="260" left="506" width="220" height="16" font="3">giving the right information and new insights... (3 Replies)
Discussion started by: parshant_bvcoe
3 Replies

2. Shell Programming and Scripting

In PHP replacing text between TAGS & URI information in Title Tag

Hi, what I am trying to do in PHP, is to replace the Title. I need some of the URL information inside aswell depending on the domain. The title is always different so I need to store it in a variable, put the url info like described below in front of it. Here is an example how it should... (0 Replies)
Discussion started by: lowmaster
0 Replies

3. Shell Programming and Scripting

extract xml tag based on condition

Hi All, I have a large xml file of invoices. The file looks like below: <INVOICES> <INVOICE> <NAME>Customer A</NAME> <INVOICE_NO>1234</INVOICE_NO> </INVOICE> <INVOICE> <NAME>Customer A</NAME> <INVOICE_NO>2345</INVOICE_NO> </INVOICE> <INVOICE> <NAME>Customer A</NAME>... (9 Replies)
Discussion started by: angshuman
9 Replies

4. Shell Programming and Scripting

Help with Awk finding and replacing a field based on a condition

Hi everybody, I'm trying to replace the $98 field with "T" if the last field (108th) is T I've tried awk 'BEGIN{OFS=FS="|"} {if ($108=="T")sub($98,"T"); print}' test.txt but that doesn't do anything also tried awk 'BEGIN{OFS=FS="|"}{ /*T.$/ sub($98,"T")} { print}' test.txt but... (2 Replies)
Discussion started by: jghi123
2 Replies

5. Shell Programming and Scripting

to add special tag to a column based on column condition

Hi All, I have following html code <TR><TD>9</TD><TD>AR_TVR_TBS </TD><TD>85000</TD><TD>39938</TD><TD>54212</TD><TD>46</TD></TR> <TR><TD>10</TD><TD>ASCV_SMY_TBS </TD><TD>69880</TD><TD>33316</TD><TD>45698</TD><TD>47</TD></TR> <TR><TD>11</TD><TD>ARC_TBS ... (9 Replies)
Discussion started by: ckwan
9 Replies

6. Shell Programming and Scripting

Replacing the text in a row based on certain condition

Hi All, I felt tough to frame my question. Any way find my below input. (.CSV file) SNo, City 1, Chennai 2, None 3, Delhi 4,None Note that I have many rows ans also other columns beside my City column. What I need is the below output. SNo, City 1, Chennai 2, Chennai_new 3, Delhi... (2 Replies)
Discussion started by: ks_reddy
2 Replies

7. UNIX for Dummies Questions & Answers

Condition based on Timestamp (Date/Time based) from logfile (Epoch seconds)

Below is the sample logfile: Userids Date Time acb Checkout time: 2013-11-20 17:00 axy Checkout time: 2013-11-22 12:00 der Checkout time: 2013-11-17 17:00 xyz Checkout time: 2013-11-19 16:00 ddd Checkout time: 2013-11-21 16:00 aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies

8. Shell Programming and Scripting

Help with XML tag value extraction based on matching condition

sample xml file part <DocumentMinorVersion>0</DocumentMinorVersion> <DocumentVersion>1</DocumentVersion> <EffectiveDate>2017-05-30T00:00:00Z</EffectiveDate> <FollowOnFrom> <ContractRequest _LoadId="export_AJ6iAFoh6g0rE9"> <_LocalId>CRW2218451</_LocalId> ... (4 Replies)
Discussion started by: paul1234
4 Replies

9. Shell Programming and Scripting

Help with XML tag value extraction based on condition

sample xml file part <?xml version="1.0" encoding="UTF-8"?><ContractWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _LoadId="export_AJ6iAFmh+pQHq1" xsi:noNamespaceSchemaLocation="ContractWorkspace.xsd"> <_LocalId>CW2218471</_LocalId> <Active>true</Active> ... (3 Replies)
Discussion started by: paul1234
3 Replies

10. Shell Programming and Scripting

Help with tag value extraction from xml file based on a matching condition

Hi , I have a situation where I need to search an xml file for the presence of a tag <FollowOnFrom> and also , presence of partial part of the following tag <ContractRequest _LoadId and if these 2 exist ,then extract the value from the following tag <_LocalId> which is "CW2094139". There... (2 Replies)
Discussion started by: paul1234
2 Replies
ENCHANT_BROKER_REQUEST_DICT(3)						 1					    ENCHANT_BROKER_REQUEST_DICT(3)

enchant_broker_request_dict - create a new dictionary using a tag

SYNOPSIS
resource enchant_broker_request_dict (resource $broker, string $tag) DESCRIPTION
create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for ("en_US", "de_DE", ...) PARAMETERS
o $broker - Broker resource o $tag - A tag describing the locale, for example en_US, de_DE RETURN VALUES
Returns a dictionary resource on success or FALSE on failure. EXAMPLES
Example #1 A enchant_broker_request_dict(3) example Check if a dictionary exists using enchant_broker_dict_exists(3) and request it. <?php $tag = 'en_US'; $broker = enchant_broker_init(); if (enchant_broker_dict_exists($broker,$tag)) { $dict = enchant_broker_request_dict($r, $tag); } ?> SEE ALSO
enchant_dict_describe(3), enchant_broker_dict_exists(3), enchant_broker_free_dict(3). PHP Documentation Group ENCHANT_BROKER_REQUEST_DICT(3)
All times are GMT -4. The time now is 10:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy