Click to See Complete Forum and Search --> : shell commands


manual_overide
02-23-2001, 01:11 PM
Ok. Which command do I use to get a line of text added to a file? Right now, I'm using:

echo "The Databases were backed up on `date`" > /foo/bar/backup.txt

It replaces the file each time I run my little script. How can I get it to add a new line to the file instead of replacing it? I want to be able to see when each backup occurred. Thanks.

BTW, I'm using bash

ph34r
02-23-2001, 02:17 PM
echo "The Databases were backed up on `date`" >> /foo/bar/backup.txt

[ 23 February 2001: Message edited by: ph34r ]

manual_overide
02-23-2001, 03:43 PM
D'OH! Thanks. Figures it would be something simple like that.