On 05/28/2014 09:58 AM, Elias Persson wrote:
> On 2014-05-28 15:40, Robert Nichols wrote:
>> On 05/28/2014 07:10 AM, Elias Persson wrote:
>>> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
>>> > tar cfz `date +%F`_$NAME.tar.gz web$NR/
>>>
>>> 3. Your `tar` stanza is wrong (if
Elias Persson wrote:
> On 2014-05-28 15:35, m.r...@5-cent.us wrote:
>> Elias Persson wrote:
>>> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
>
tar cfz `date +%F`_$NAME.tar.gz web$NR/
>
>>>
>> Dumb question: why not
>
>> tar -czf /backup/www/test/`date +%F`_$NAME.t
On 2014-05-28 15:35, m.r...@5-cent.us wrote:
> Elias Persson wrote:
>> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
>>> tar cfz `date +%F`_$NAME.tar.gz web$NR/
>>
> Dumb question: why not
> tar -czf /backup/www/test/`date +%F`_$NAME.tar.gz web$NR/
>> A few things:
>
Am 28.05.2014 um 15:35 schrieb m.r...@5-cent.us:
>> 3. Your `tar` stanza is wrong (if it's not obvious to you why that is,
>>now is a good time to make a habit of using long options
>>(e.g. `--gzip`) whenever possible).
>
> Why long?
Best practice -> readability.
--
LF
___
On 2014-05-28 15:40, Robert Nichols wrote:
> On 05/28/2014 07:10 AM, Elias Persson wrote:
>> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
>>> tar cfz `date +%F`_$NAME.tar.gz web$NR/
>>
>> 3. Your `tar` stanza is wrong (if it's not obvious to you why that is,
>> now is
On 05/28/2014 07:10 AM, Elias Persson wrote:
> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
> > tar cfz `date +%F`_$NAME.tar.gz web$NR/
>
> 3. Your `tar` stanza is wrong (if it's not obvious to you why that is,
> now is a good time to make a habit of using long options
>
Elias Persson wrote:
> On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
> >
> > while read line;
> > do
> > read NR PATH NAME<<<$(IFS=" "; echo $line)
> >
> > cd /var/www/clients/
> > cp -R $PATH /backup/temp/www/
> > cd /backup/temp/www/
> >
>
On 2014-05-25 12:08, Paolo De Michele wrote:> !/bin/bash
>
> while read line;
> do
> read NR PATH NAME<<<$(IFS=" "; echo $line)
>
> cd /var/www/clients/
> cp -R $PATH /backup/temp/www/
> cd /backup/temp/www/
>
> tar cfz `date +%F`_$NAME.tar.gz
Yes!
PATH should be a reserved name, NOT to be used as a variable in scripts.
btw, what errors do you get running the script ?
On Tue, May 27, 2014 at 11:44 PM, Darr247 wrote:
> On 26 May 2014 @09:12 zulu, Alberto Varesio wrote:
> > you are overwriting the PATH env variable.
> > change PATH t
On 26 May 2014 @09:12 zulu, Alberto Varesio wrote:
> you are overwriting the PATH env variable.
> change PATH to CLIPATH and all will work
I don't understand, too... do you mean the script should read
!/bin/bash
while read line;
do
read NR CLIPATH NAME<<<$(IFS=" "; echo $line)
Hi,
I don't understand the procedure
so, in theory the path should be /var/www/clients/client* (I have number
from 1 to X)
I replaced the PATH in read section
It's correct?
On 05/26/2014 11:12 AM, Alberto Varesio wrote:
> Hi
> you are overwriting the PATH env variable.
> change PATH to CLIPATH
Hi
you are overwriting the PATH env variable.
change PATH to CLIPATH and all will work
On Sun, May 25, 2014 at 12:08 PM, Paolo De Michele
wrote:
> hi everyone,
>
> I'm searching to do a functionally bash script for copy many file inside
> in a directory
> the scenario is:
>
> root path= /var/www
hi everyone,
I'm searching to do a functionally bash script for copy many file inside
in a directory
the scenario is:
root path= /var/www/clients/
inside of this there are many subdirectories with this name: client1 to
x (depends of the customer)
it happens that a customer not renew the contract
13 matches
Mail list logo