Following a section in opmn.xml file:
I need to find the line <process-type id="OC4J_RiGHTv_<SCHEMA_NAME>
Under this line find the line "<variable id="LD_LIBRARY_PATH .........."
and appending under this line :
<variable id="LD_LIBRARY_PATH" value="${ORACLE_HOME}/j2ee/OC4J_RiGHTv_${SCHEMA_NAME}/orca-3rd-lib" append="true"/>
The requested result should be :
ORACLE_HOME=/home/ias/v10.1.2
SCHEMA_NAME=IRD1
I wrote the following function:
I run the function and the final result was not as I needed:
What is my mistake in the function update_opmn_xml?
Thanks a lot for your reply!
It is close to what I need.
Let me clarify :
The string <variable id="LD_LIBRARY_PATH" value="/home/ias/v10.1.2/lib" append="true"/> appears a lot in opmn.xml so I cannot find this string and append bellow it my string.
The unique string is <process-type id="OC4J_RiGHTv_$SCHEMA_NAME" module-id="OC4J">
So ,the find steps for the sed should be:
1. Find <process-type id="OC4J_RiGHTv_$SCHEMA_NAME" module-id="OC4J">
2. Bellow the above ,find <variable id="LD_LIBRARY_PATH" value="$ORACLE_HOME/lib"
3. Under the string from step 2,append the requested string.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi experts
I want your help to change the file format to my wanted version, please give me a hand thanks
$cat file
install pass
make os pass
make build kernel failed
usb storage pass
chane to
| *install* | *make os* | *make build kernel* | *usb storage* |
| pass | pass... (7 Replies)
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)