[Solved] Append instead of overwrite


 
Thread Tools Search this Thread
Top Forums Programming [Solved] Append instead of overwrite
# 1  
Old 01-02-2012
[Solved] Append instead of overwrite

Hi,

I have a script which append the .csv file which already exist but in my scenarion every time instead of appending the contect it overwrite the file and creating new .csv file.

PHP Code:
SET ORAUSR=ops$371664
SET ORAPWD
=Oracle12345
SET ORADB
=orcl
SET DBCON
=%ORAUSR%/%ORAPWD%@%ORADB%
sqlplus --%DBCON% @AEAE.sql >C:\opapps\xmltemp\AEAE.csv 
,
What else option i have to mention in this script to append the file.

---------- Post updated at 08:06 AM ---------- Previous update was at 07:58 AM ----------

for append >>

Last edited by radoulov; 01-02-2012 at 09:17 AM.. Reason: Marked as solved.
# 2  
Old 01-09-2012
Please modify the code

Code:
sqlplus -l -s %DBCON% @AEAE.sql >>C:opappsxmltempAEAE.csv

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

First run overwrite then append

I'm overwriting .unl in first run and after that in seq. runs appending by following method. Any other method or command can do it easier? ARY_VALUE=1 while do if ; then type.sql > out.unl else type.sql >>out.unl fi ARY_VALUE--; done (3 Replies)
Discussion started by: Roozo
3 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Suppress do you wish to overwrite (y or n)?

Hi all, as i have to deal every day with .log and also .csv files, i would like to know if there is any way to suppress "do you wish to overwrite (y or n)?" prompt with the option no for all prompts, the command i usually run is the following, find... (2 Replies)
Discussion started by: charli1
2 Replies

3. Shell Programming and Scripting

[solved] sed append into .bashrc

Hi all, I'm trying to do a basic append into /home/joe/.bashrc: /usr/bin/test -z `sudo /bin/grep umask /home/joe/.bashrc` && sudo /bin/sed -i '/PATH=/a \ umask 0022 ' /home/joe/.bashrc I run this as user floren with full root privileges in sudoers. For some reason, the first command is... (1 Reply)
Discussion started by: TECK
1 Replies

4. Shell Programming and Scripting

Better to Delete or Overwrite

Hello All, I had just a question about my Bash Script I'm currently writing. The script I have writes some text to a output file. After I write to the output file I send the file to another server to do some stuff with it. After the file sends in the script, I don't need the output/txt... (4 Replies)
Discussion started by: mrm5102
4 Replies

5. Shell Programming and Scripting

[Solved] Append an header to a tab delimited file

Dear All, I would like to find an automatic way to add a given code which belong to a class at the end of the column , for example this is my input file: 0610009O20Rik V$VMYB_01 310 (+) 1 0.971 v-Myb V$EVI1_04 782 (-) 0.763 0.834 Evi-1 V$ELK1_02 1966 (-) 1 0.984 Elk-1... (4 Replies)
Discussion started by: paolo.kunder
4 Replies

6. Shell Programming and Scripting

[Solved] Find and append line to output

Hi All, I am trying to write a shell script but not getting desired output. What i am trying to do. 1.I want to use find command command and then use it xargs/exec to append the find output.But i am not getting desired output here is what i am trying to do #find init*.ora -exec `echo... (4 Replies)
Discussion started by: sahil_shine
4 Replies

7. Shell Programming and Scripting

Append file based upon user input-- solved

Ok, I have a script with a commandline option that allows the user to add a custom function to the script file. I have tried everything in my limited knowledge of sed to get this to work and keep coming up short. I need sed to search for a line starting with a pattern, I've got that part so far,... (0 Replies)
Discussion started by: DC Slick
0 Replies

8. UNIX for Dummies Questions & Answers

Output to file but append rather than overwrite?

I am running a command which has a parameter that outputs the results to a file each time it is run. Here is the command: --fullresult=true > importlog.xml Can I add the output to the file rather than creating a new one which overwrites the existing one? If not can I make the file name... (2 Replies)
Discussion started by: Sepia
2 Replies

9. UNIX for Dummies Questions & Answers

overwrite problem

Hi im using the following to copy a file to a directory, the user being prompted to overwrite if the file already exists in that directory, cp -i myfile /home/brief/bin2 but this reveals the path of the directory when being prompted to overwrite (below) cp: overwrite... (2 Replies)
Discussion started by: ali999
2 Replies

10. UNIX for Dummies Questions & Answers

Overwrite

if i want to pipe output to a file, say, cat abc.dat > abc.txt, how do i make it replace the existing file? (9 Replies)
Discussion started by: Duckman
9 Replies
Login or Register to Ask a Question