[Linux-disciples] write to file from shell script

Jamie Forrest jamie at jamieforrest.com
Tue Nov 15 22:15:11 EST 2011


I seem to have solved it as follows:

#!/bin/bash

logfile=/Users/jforrest/Projects/django-cnsltme/cnsltme/backup/`date
+%F`_dump.sql
exec gondor sqldump primary > $logfile

Is it correct?


On Tue, Nov 15, 2011 at 10:08 PM, Adam Rosi-Kessel <adam at rosi-kessel.org> wrote:
> On 11/15/2011 10:01 PM, Jamie Forrest wrote:
>>
>> I'm running it from a subdirectory in my home dir. I tried changing it
>> to a full path and still no dice. And yes the output from gondor
>> sqldump goes to screen normally.
>
> Add 2>&1 ?
>



-- 
http://about.me/jamieforrest


More information about the Linux-disciples mailing list