+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, output script to log file in Coding and Web Development; Ive got some scripts Ive written that I want the output to be appended to a file. Ive added the ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199

    output script to log file

    Ive got some scripts Ive written that I want the output to be appended to a file. Ive added the scripts to cron, and tried to output the result to log files:

    It seems to work, but doesnt append, it overwrites each time. Is there a simple way to output it and append?

    Code:
    * * * * * /etc/cron.d/sort.old.sh > /var/log/chattr.log
    0 1 * * * python /etc/cron.d/funky_file_mover.py > /var/log/funky_file_mover.log
    0 2 * * 1 /etc/cron.d/move.sh > /var/log/move.log
    30 2 * * * /etc/cron.d/rename.sh > /var/log/renamed.log

  2. #2

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    never knew that.

    thanks

SHARE:
+ Post New Thread

Similar Threads

  1. Script to delete profile at log off?
    By woody in forum Windows
    Replies: 74
    Last Post: 15th February 2013, 02:28 PM
  2. Replies: 17
    Last Post: 18th June 2010, 12:48 PM
  3. Replies: 4
    Last Post: 7th March 2007, 03:37 PM
  4. Replies: 4
    Last Post: 23rd March 2006, 06:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •