Skip to main content

All Questions

Tagged with
1 vote
2 answers
299 views

Extract IP:PORT from a curl output

I want to get list ip:port from the curl output of curl https://www.gametracker.com/search/?sort=5&order=ASC I cannot post the whole output as it is very big, just posting the part from where we ...
ph3ro's user avatar
  • 378
0 votes
1 answer
346 views

How to filter multiline with awk, grep and/or powershell

My scenario is I have a file that has the contents looking like this but longer. https://pastebin.com/q33wFdAX I need to remove each occurrence of <category>Games</category> </...
volitank's user avatar
0 votes
5 answers
4k views

How to insert a newline character after each occurrence of a specific XML tag in a file?

How to insert a newline character after each occurrence of a specific XML tag in a file? My file has multiple tags </Data> and I want to insert a NewLine character after each </Data> tag I'...
Megalex's user avatar
-1 votes
1 answer
174 views

To get the value of specific attribute value as True or False, having uneven columns [duplicate]

I am having one file with the below two lines in the file. I need to check if the value of xpoweredBy is true or false. Many thanks in advance. <Connector clientAuth="false" sslProtocol="TLS"...
Taha Tikiwala's user avatar
1 vote
1 answer
454 views

Find a specific record from an XML file [closed]

I have an XML with one record each in same xml tags; sample given as below. I need to get the specific record displayed by giving the search pattern as '4017|95592'. Output should be: 4017|95592|S|Y|...
Tiara's user avatar
  • 11
0 votes
3 answers
67 views

How to replace a matching string if n+2 line does not contain a particular string

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/...
user312307's user avatar
0 votes
2 answers
367 views

grep or awk to extact xml from log based on search string

I have a log file which has XMLs being logged. I need to search and extract all XML's that have a specific string in the any one of the nodes. e.g. the log file will have mulitple xml's containing ...
Saravanakumar Mohan's user avatar
0 votes
4 answers
1k views

need to join only certain lines of a xml file together [duplicate]

I would like to transform this XML to where only certain lines are joined together. This is so I can later grep only specific lines. If this XML used attributes, then the data would already be in 1 ...
Jaymer Jaymer.'s user avatar
4 votes
1 answer
1k views

filter xml documents matching certains ids

Suppose you have a file containing many xml documents, like <a> <b> ... </a> in between xml documents there may be plain text log messages <x> ... </x> ... How ...
Evgeniy Berezovsky's user avatar
1 vote
1 answer
744 views

Find a pattern in XML using unix command

I have XML like below <a> </a> <a> <b></b> <c></c> </a> I need to find line numbers of the empty tags which are in two consecutive lines without any ...
user7952074's user avatar
1 vote
3 answers
293 views

Search for a String, On Success Search for Nearest Pattern

I have an XML file of format, {XML file with similar tags - SubRecord and Property} ... <SubRecord> <Property Name="Name">My Main Search Keyword</Property> <Property Name="...
Dud's user avatar
  • 33
1 vote
2 answers
397 views

Combine two greps into a single command

I have some XML that looks something like this: <artifactId>myproject</artifactId> <version>1.14.0-SNAPSHOT</version> I want to extract the version, i.e. 1.14.0-...
Big McLargeHuge's user avatar
2 votes
5 answers
964 views

Getting substrings in between delimiters multiple times from one string without looping

I have looked all over for a solution to this, but I couldn't find one. I am using qstat -x to pass a large string of job information. The output from qstat -x is in XML format. The substrings I am ...
boof's user avatar
  • 404
3 votes
2 answers
3k views

search for exact string in unix

I have a file, xyz.txt, which has one string per line. How do I search xyz.txt for an exact match? I get an input string, eg. defabc, from another app. If defabc is found, it should return true, else ...
kumar2008's user avatar
1 vote
4 answers
918 views

Extract specific value from block of data

I have the following block of data and need to extract the percent value in XYZ FREEBYTES, i.e. captured value should be equal to 64. As far as I know, I can grep and cut the data. However, the digits ...
alex's user avatar
  • 121

15 30 50 per page