Computing.Net > Forums > Unix > sending code to a file

sending code to a file

Reply to Message Icon

Original Message
Name: bhben
Date: December 2, 2004 at 01:48:44 Pacific
Subject: sending code to a file
OS: Windows XP
CPU/Ram: P4, 512MB
Comment:

I am sending some xml code that is produced by a script to a file, but every time i run this script the code is written to the file without overwriting what was written the previous time, so it is duplicated in the destination file. I had a similar setup with a different script and file but the here the code was overwritten. How can i avoid this?


Report Offensive Message For Removal


Response Number 1
Name: David Perry
Date: December 2, 2004 at 04:14:09 Pacific
Reply: (edit)

echo "test" > file # over writes or creates a new document 'file'

echo "test" >> file # appends to 'file'


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: sending code to a file

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge