The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Restrict file overwrite through FTP imranak7 UNIX for Dummies Questions & Answers 7 11-03-2008 06:51 AM
shell overwrite lines in a file ACTGADE UNIX Desktop for Dummies Questions & Answers 4 10-28-2008 07:47 AM
Append Output to another file in Perl Raynon Shell Programming and Scripting 7 09-03-2008 03:29 AM
overwrite specific lines in a file csecnarf Shell Programming and Scripting 7 05-13-2008 11:01 AM
Append output to file ayhanne Shell Programming and Scripting 3 10-24-2007 12:30 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-18-2009
Sepia Sepia is offline
Registered User
  
 

Join Date: Apr 2007
Location: England
Posts: 49
Question 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 have a time stamp so it is unique?

EG: 20090112-1641importlog.xml or similar.

Thanks.
  #2 (permalink)  
Old 06-18-2009
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool use of > and >>

> will create a new file
>> will append to existing file (creating new at first execution)
  #3 (permalink)  
Old 06-19-2009
Sepia Sepia is offline
Registered User
  
 

Join Date: Apr 2007
Location: England
Posts: 49
That's great. Thanks.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0