Find the answer to your Linux question:
Results 1 to 4 of 4
so i need to write the result of the "date" command in an existing text file every 2 or so hours (its weird, its a school project). the only way ...
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2

    [SOLVED] help with shell script

    so i need to write the result of the "date" command in an existing text file every 2 or so hours (its weird, its a school project).
    the only way i know of doing this is by using ">", so i would put "date > file"
    the problem is this replaces any previously written data in the file, i need to write it in a new line.. i know this has something to do with the append mode..

    thanks in advance

  2. #2
    Linux Newbie egan's Avatar
    Join Date
    Feb 2009
    Location
    Mountain View, CA
    Posts
    132
    Yes, to append stdout, use >>
    Not that hard to google...

  3. #3
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    use the double ">>" notation to append
    the sun is new every day (heraclitus)

  4. #4
    Just Joined!
    Join Date
    Jun 2009
    Posts
    2
    thanks a lot, im a total newbie in this stuff , didnt even know how to google that :$

Posting Permissions

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