Searching the value of a specific attribute among xmls files from a particular directory location
Hi Folks ,
I have the different xml files at the following directory `/opt/app/rty/servers/tr/current/ops/config`
Let's say there are three files named
Now inside these xml there can be many tags as like shown below
Now my objective is that inside directory /opt/app/rty/servers/tr/current/ops/config I need to search in all xml files and have to find that in every xml in context to property tag there should be no value starting from @ tag and also ending with @ tag
Let's say for example in the above xml file the below is correct
but the below is not correct
so please advise what will be the single command in unix to search the files names that is those xml in which there is a tag starting with @ inside the property tag , There must be a command starting with egrep..
Last edited by Scrutinizer; 06-19-2016 at 02:49 AM..
Reason: quote tags -> code tags
A simple approach would be:
But that assumes every property is neatly on one line.
Thanks but when i executed this as in this fashion below
well it searches among all xml's which is OK but it bring out the all the value tags but i am looking for the tags like as shown below only
so as you can observe the output should be only the tags in which from within the value tag the value is staring from @ tag and ending with @ tag only , please advise how to achieve this
Thanks but it is still not working , please advise can it be like this as I have shown below since outside there is a bean tag inside there is a property tag and inside that there is value tag . please advise
Hi
This is my third past and very impressed with previous post replies
Hoping the same for below query
How to find a existing file location and directory location in solaris box (1 Reply)
Hello,
Please help me with this!! Thanks in advance!!
I have a file named file.gc with the content:
1-- Mon Sep 10 08:53:09 CDT 2012
2revoke connect from FR2261;
3delete from mkt_allow where grantee = 'FR2261';
4grant connect to FR2261 with '******';
5alter user FR2261 comment... (0 Replies)
Hi,
Could someone give me a hand with a search for files with two possible extensions, please. The requirement is simple - I need to issue a single ls command searching for files with the suffix of, say, *.txt and *.log.
I've tried to use ls *.txt *.log which works if there are both... (4 Replies)
Hi All,
I have a requirement wherein I need to test if a line in file succeeding "IF" statement has "{" .If the line succeeding "IF" statement does not have "{" , then I need to insert the "{". Similarly , I need to check if a line in file preceding "ENDIF" statement has "}" .If not , then I... (2 Replies)
Hello,
I am wondering if you can assist with my question and ask kindly for this.
I have a number of files that are listed as file1.gz through file100.gz.
I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Hi,
I am trying to write a script that will search in a particular directory and tell me how many files are in there. I then want to be able to email certain users of how many files are in that directory and what the file names are?
any help would be great as i am getting confused.
thanks (3 Replies)
hey,
i need to use grep to search a bunch of header files inside a directory to return which file i can find the function i'm searching for in. how do i use wild cards to search through the files? i can only figure out how to search inside the directory, not inside the files that are in the... (4 Replies)
Hi everyone,
I need to search files starting with RPT_0, RPT_1,........ in a directory. How can I implement that through a shell script. Also I want to read the last line of each file after searching them. Can someone help me out in this regard.
One more thing how I can extract a particular... (7 Replies)
Is it possible to search through a large file full of rows and columns of text and retrieve only the rows that contain duplicates fields,
searchiing for duplicates on col4 & col6
Sample below
Col1 col2 col3 col4 col5 col6
G405H SURG FERGUSON ... (2 Replies)