I have xml file like below, i want change the values at default-value place of each argument name using shell script. like
where argument name= protocol and default-value=tcp,
where argument name =port and default-value= 7223,
where argument name = username and default-value=test,
example
could some one please help me..
Moderator's Comments:
Pleased post in the right forum. Moving thread
Last edited by Scrutinizer; 07-07-2016 at 08:58 AM..
Reason: code tags
Do you just want to change <argument name> tag data if the tag appears between <task-arguments> and </task-arguments> tags; or do you want to change them everywhere they appear?
Where do the new values come from? Is there a configuration file? Are they given as command-line arguments? Are they to be hardcoded in your script?
Are only the values shown in the example to be replaced, or are all values found in your input file to be replaced?
What is the name of your XML file? Is the name to be given as a parameter to your script? Is the name to be hard coded into your script?
What have you tried to solve this problem on your own?
Hi Don,
Please see my comment below..
What operating system and shell are you using?
RHEL
Do you just want to change <argument name> tag data if the tag appears between <task-arguments> and </task-arguments> tags; or do you want to change them everywhere they appear?
I want to change the values only the tag b/w <task-arguments> and </task-arguments> tags.
Where do the new values come from? Is there a configuration file? Are they given as command-line arguments? Are they to be hardcoded in your script?
Those values are coming from configuration file..
Are only the values shown in the example to be replaced, or are all values found in your input file to be replaced?
All the values to be replaced which are b/w the tag.
What is the name of your XML file? Is the name to be given as a parameter to your script? Is the name to be hard coded into your script?
monitor.xml and the value is hard coded
What have you tried to solve this problem on your own?
tried like below
Moderator's Comments:
Please use code tags as required by forum rules!
Last edited by RudiC; 07-07-2016 at 04:09 PM..
Reason: Added code tags.
The values means, Where ever it's highlighted in that place the values should update using my script file.
---------- Post updated at 01:35 PM ---------- Previous update was at 01:24 PM ----------
Do,
I need to create new one script file and i am using my shell is !/bin/sh...
In this script i am declaring the values like below.
I hope you understand everything now....
---------- Post updated at 01:40 PM ---------- Previous update was at 01:35 PM ----------
Don,,
I tried using sed command, it working but i am tying is there any another way to update values or not?
I hope you understand my requirement here...
Moderator's Comments:
Please use code tags as required by forum rules!
Ignoring our requests repeatedly already led to an infraction given to you, and it may result in more severe actions.
Last edited by RudiC; 07-08-2016 at 05:36 AM..
Reason: Added code tags.
Dear community,
I have a big XML log file containing several rows splitted by tag: <ActivityLogRecord> and </ActivityLogRecord>. An example below.
What I need is read the file and extract some value from each tags and put them into one line (each line for every <ActivityLogRecord> tag).
So... (5 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
Hi All,
I have two xml files.
One is having below input
<NameValuePair>
<name>Daemon</name>
<value>tcp:7474</value>
</NameValuePair>
<NameValuePair>
<name>Network</name>
<value></value>
</NameValuePair>
... (2 Replies)
Hi,
I need to capture all the attributes with delete next to it. The source XML file is attached.
The output should contain something like this below:
Attributes = legacyExchangeDN
Action = Delete
Username = Hero Joker
Loginid = joker09
OU =... (4 Replies)
Hello I am a noob in XML and Python. I am trying to do this for my MSc project about a network simulation and need some help.... I want to change the values shown below:
<num_crash_failures>1</num_crash_failures>
−<crash_failure_entry>
<freeze_at_slot>0</freeze_at_slot>... (0 Replies)
Hello,
I don't have experience in this scripting and I need some help to read a value from an XML file and change it with a random number to use in simulator for different network scenarios.
</Description><sim_comm_rounds>35</sim_comm_rounds><num_clusters>1</num_clusters><Clocking>
I want to... (5 Replies)
Hi,
I am new to UNIX and shell scripting.
I have to create a shell script(ksh) which parses log4j.xml file for a given webservice name and change the corresponding value from INFO to DEBUG or vice-versa.
My log4j.xml looks like:-
<!-- Appender WEBSERVICENAME-->
<appender... (3 Replies)
Hello People,
I have an xml file from which I need to extract the values of the parameters using UNIX shell commands.
Ex : Input is like :
<Name>Roger</Name>
or
<Address>MI</Address>
I need the output as just :
Roger
or
MI
with the tags removed.
Please help. (1 Reply)