I have a similar scenario. I have an xml file which I compiled in unix and i send it out as an attachment which opens with excel. Now there are certain keywords (kw01)in the xml file which I wanted to replace with the contents of txt files having multiple lines.
So i tried your code above with this command:
sed '/kw01/r fatal_alerts.txt' template.xml | sed '/kw01/d' > test.xml
now when I sent out the output file 'test.xml' and open it via excel, the cell where 'kw01' is located is not replaced with the contents of 'fatal_alerts.txt'.
Is there a possible way to do this sir? Need your help badly.
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
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)
Hello everyone,
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
RAISEDATTIME
--------------------... (13 Replies)
Would appear to me to be a farily simple question but having search all the threads I can't find the answer .. I just want sed to output the single line in a file that contains two string anywhere on the line..
e.g. currently using this command
sed -n -e'/str1/p' -e '/str2/p' < file
and... (3 Replies)
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Hi experts,
In my text file I have the following alot of lines like below.
input.k is as follows.
2684717 -194.7050476 64.2345581 150.6500092 0 0
2684718 -213.1575623 62.7032242 150.6500092 0 0
*INCLUDE
$# filename... (3 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
LEARN ABOUT SUNOS
reconfig
asadmin-reconfig(1AS) User Commands asadmin-reconfig(1AS)NAME
asadmin-reconfig, reconfig - applies the changes you have made for a server instance
SYNOPSIS
reconfig --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--discard-
manualchanges=false] [--keepmanualchanges=false] instance_name
This command is deprecated. It allows you to apply changes you have made for a server instance. Use the reconfig command after you've used
the set command to change server properties. Any changes you make to the configuration files of the server do not take affect until you
apply the changes by running the reconfig command. When --discardmanualchanges is set to true, manual changes made to the server.xml file
are discarded. When --keepmanualchanges is set to true, manual changes made to the server.xml file take affect. However if both options are
false (both options are not specified), an error message is displayed if manual changes and/or changes have been applied using the Adminis-
trator Interface. Use this command with discretion since there is no undo, and the changes applied are made directly to your con-
fig/backup/server.xmlfile.
OPTIONS --user administrative user associated for the instance.
--password administrative password corresponding to the administrative user.
--host host name of the machine hosting the administrative instance.
--port administrative port number associated with the administrative host.
--passwordfile file containing passwords appropriate for the command (e.g., administrative instance).
--secure if true, uses SSL/TLS to communicate with the administrative instance.
--discardmanualchanges defaults to false. When set to true, discards the changes made manually to the server.xml file.
--keepmanualchanges defaults to false. When set to true, allows the manual changes made to the server.xml file to take affect.
OPERANDS
instance_name name of the instance..
Example 1: Using reconfig
asadmin> reconfig --user admin
--passwordfile passwords.txt --host localhost --port 4848 server1
Successfully reconfigured
Example 2: Using reconfig with the --discardmanualchanges option
asadmin> reconfig --user admin --passwordfile passwords.txt --host localhost --port 4848 --discardmanualchanges server1
Instance restart is required
Successfully reconfigured
Example 3: Using reconfig with the --keepmanualchanges option
asadmin> reconfig --user admin --passwordfile passwords.txt --host localhost --port 4848 --keepmanualchanges server1
Instance restart is required
Successfully reconfigured
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-get(1AS), asadmin-set(1AS), asadmin-list(1AS)J2EE 1.4 SDK March 2004 asadmin-reconfig(1AS)