[Linux-disciples] write to file from shell script
Adam Rosi-Kessel
adam at rosi-kessel.org
Tue Nov 15 23:14:15 EST 2011
Funny, I was going to recommend that but then I thought I was wrong.
Sent from mobile
On Nov 15, 2011, at 11:06 PM, Stephen R Laniel <steve at stevereads.com> wrote:
> ::smacks forehead::
>
> Gah. Yes, Dylan is right, of course. Good eye, gumshoe.
>
> On Nov 15, 2011, at 11:04 PM, Dylan Paul Thurston wrote:
>
>> The problem in the initial script, this one:
>>
>> On Tue, Nov 15, 2011 at 09:28:09PM -0500, Jamie Forrest wrote:
>>> #!/bin/bash
>>>
>>> NOW=`date +%F`
>>> gondor sqldump primary > $NOW_dump.sql
>>
>> is that it's looking for a variable $NOW_dump, which doesn't exist.
>> It probably created a file '.sql' as a result. You can fix it like
>> you did later, or by adding braces:
>>
>> #!/bin/bash
>>
>> NOW=`date +%F`
>> gondor sqldump primary > ${NOW}_dump.sql
>>
>> --Dylan
>> _______________________________________________
>> Linux-disciples mailing list
>> Linux-disciples at lists.bostoncoop.net
>> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>
>
> --
> Stephen R. Laniel
> steve at stevereads.com
> Cell: +(617) 308-5571
> http://stevereads.com/
> PGP key: http://stevereads.com/slaniel.key
>
> _______________________________________________
> Linux-disciples mailing list
> Linux-disciples at lists.bostoncoop.net
> http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>
More information about the Linux-disciples
mailing list