update file command help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers update file command help
# 1  
Old 05-07-2007
update file command help

please explain this update to the webcache.xml file ( attached)
sorry i come from a windows env

thank you

*************
echo -n "7. Updating webcache.xml file..."
set line_num = `grep -n "</CACHEABILITY>" $ORACLE_HOME/webcache/webcache.xml | tail -1 | cut -d : -f 1`
head -`expr $line_num - 1` $ORACLE_HOME/webcache/webcache.xml > webcache.xml.bcp
cat cacherule.txt >> webcache.xml.bcp
tail +$line_num $ORACLE_HOME/webcache/webcache.xml >> webcache.xml.bcp
if ($os_name == "Linux") then
cp -vu $ORACLE_HOME/webcache/webcache.xml $ORACLE_HOME/webcache/webcache.xml.orig >> $logfile
cp -vu webcache.xml.bcp $ORACLE_HOME/webcache/webcache.xml >> $logfile
else
cp $ORACLE_HOME/webcache/webcache.xml $ORACLE_HOME/webcache/webcache.xml.orig >> $logfile
cp webcache.xml.bcp $ORACLE_HOME/webcache/webcache.xml >> $logfile
endif
echo "Succeeded."
********************************************
if possible plese upload the updated file
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

awk to update file with partial matching line in another file and append text

In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies

2. Shell Programming and Scripting

Perl to update field in file based of match to another file

In the perl below I am trying to set/update the value of $14 (last field) in file2, using the matching NM_ in $12 or $9 in file2 with the NM_ in $2 of file1. The lengths of $9 and $12 can be variable but what is consistent is the start pattern will always be NM_ and the end pattern is always ;... (4 Replies)
Discussion started by: cmccabe
4 Replies

3. Shell Programming and Scripting

UPDATE COmmand post comparing 2 columns in 2 mysql tables

my queryis : select distinct m.name, item_count, item from master m join client p on m.name=p.name where item_count = 1 and item > 1; But how should I update them? i used update statetment : Update from client Set item =1 where m.name=p.name and item_count=1 AND item>1 Is this wrong? (1 Reply)
Discussion started by: siya@
1 Replies

4. Shell Programming and Scripting

Unable to update the string in a file trough case command

Hi All, my requirement is first search the line and updated stg value with the user input value. ws.rsp.url=https://rt930.rsp-stg.cb.info53.com/RSP/RAFT^M stg is not fixed string it may varies.So i used the below command for it rsp=`cat properties | grep ^ws.rsp.url= | awk -F"/"... (1 Reply)
Discussion started by: bhas85
1 Replies

5. Programming

Using tops command to update NSLog statements in objective-c code

In my objective-c code base I have several NSLog statements. eg. NSLog(@"Here is the message without arguments"); NSLog(@"Here is the message with arguments: %s, %s","argument1","argument2"); Now I want to do two things: First to do: updating NSLog statements with... (0 Replies)
Discussion started by: Miraaj
0 Replies

6. Shell Programming and Scripting

Logging in and running an update file from command

I am trying to upgrade many installations of a gallery script called coppermine through the commandline. I've copied the latest files of the script to each account. Then, I need to run a file gallery/update.php which requires I log in I can create an admin user for myself for each... (2 Replies)
Discussion started by: vanessafan99
2 Replies

7. Shell Programming and Scripting

Mulitple rows update by sed command

Hi All, I need to update 2 rows in my file. But i can do only one row update by sed command. Please help me how can i change mutltiple rows in single sed commana my i/p file: (example.txt) record integer (10) present_id; string (10) first_name; string (10) last_name; string... (2 Replies)
Discussion started by: pdathu
2 Replies

8. UNIX for Dummies Questions & Answers

Command to update last line.

Hi, I need to replace the record count which is in the last line of the text file to a new record count. The file is a fixed length file, and whole file is list of numbers and the last line looks like this. 9#EOF# 00000000000000000016 ... (9 Replies)
Discussion started by: shinny
9 Replies

9. Shell Programming and Scripting

Command to create and update csv file

Hi, I need to create a csv file to store oracle query output. This report need to be created on hourly basis. The csv file report format as "Report_22_Sep_09_13IST.csv". I have the oracle query. Now i need to create and move the oracle query output to the report row by row starting from 3rd row.... (6 Replies)
Discussion started by: Sekar1
6 Replies

10. Red Hat

How to update all rpms using single command option

Can any one help me to know the command option that will update all rpms Thanks in advance.. (2 Replies)
Discussion started by: RajendraKumar
2 Replies
Login or Register to Ask a Question