10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies
2. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
3. Shell Programming and Scripting
I need to search this "<CardinalMPI>" string and replace the same string above two lines of the string.
Nov 16, 2012 12:58:34 PM
INFO: Centinel LookUp ResponseXML : <CardinalMPI>
<ReasonCode></ReasonCode>
<ErrorDesc></ErrorDesc>
<MerchantReferenceNumber></MerchantReferenceNumber>... (4 Replies)
Discussion started by: laknar
4 Replies
4. Shell Programming and Scripting
Hi,
I need to replace and append a string in a text if grep is true. For eg:
grep ABC test.txt | grep -v '\.$' | awk {'print $4'} | sed "s/ ?
How do I replace all instances of "print $4" using sed with another sring? Eg of the string returned will be,
lx123
web222
xyz
Want to... (8 Replies)
Discussion started by: vchee
8 Replies
5. Shell Programming and Scripting
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Discussion started by: Mbohmer
6 Replies
6. Shell Programming and Scripting
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies
7. Shell Programming and Scripting
hi all!
i have a working that looks like this...
file1
MALE JOHN
MALE ANJO
FEMALE ANNE
MALE JAMES
FEMALE HONEY
FEMALE IZA
what i want to do is insert "M" when the first string is "MALE" and insert "F" when the first string is "FEMALE".
file1
M MALE ... (10 Replies)
Discussion started by: kingpeejay
10 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Discussion started by: ganesh_248
27 Replies
9. Shell Programming and Scripting
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Discussion started by: daikeyang
6 Replies
10. Shell Programming and Scripting
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Discussion started by: ganesh_248
15 Replies