Re: OT: Re: Help with a bash script please

2011-01-14 Thread Boyd Stephen Smith Jr.
In <20110114120047.ga7...@hysteria.proulx.com>, Bob Proulx wrote: >Adrian Levi wrote: >> zparameters="a -mhe=on -pd1ckhead -t7z -m0=lzma -mx=9 -mfb=64 -md=32m >> -ms=on -si" zfilename="Daily Backup - $(date +"%a %h %H%M >> %d-%m-%Y").$backuplevel.tar.7z" > >Yuck! Look at all of those spaces in the

Re: OT: Re: Help with a bash script please

2011-01-14 Thread Boyd Stephen Smith Jr.
In <4d303ac4.2020...@chello.at>, Mart Frauenlob wrote: >On 14.01.2011 11:37, Adrian Levi wrote: >> I have (hopefully) taken on everybody's suggestions, Here is the >> current script :) >> >> >> #!/bin/sh >> >> # Variables: >> # Determine backup level >> incrementalfile="/srv/tar_incremental_file

Re: OT: Re: Help with a bash script please

2011-01-14 Thread shawn wilson
No real help here, just some general comments. First, don't cd in a script. Use full paths - this includes defining paths to your programs (if you or someone else put a different program with the same name that is found earlier in your path, your script is liable to cause a big mess). Bash is nice

Re: OT: Re: Help with a bash script please

2011-01-14 Thread Mart Frauenlob
On 14.01.2011 12:50, Adrian Levi wrote: I know where the error lies but not how to fix it. zparameters="a -mhe=on -pd1ckhead -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -si" zfilename="Daily Backup - $(date +"%a %h %H%M %d-%m-%Y").$backuplevel.tar.7z" When these two expand here: tar $tarparamet

Re: OT: Re: Help with a bash script please

2011-01-14 Thread Mart Frauenlob
On 14.01.2011 11:37, Adrian Levi wrote: I have (hopefully) taken on everybody's suggestions, Here is the current script :) #!/bin/sh # Variables: # Determine backup level incrementalfile="/srv/tar_incremental_file" if [ -f $incrementalfile ] then backuplevel="date +%w" you want: backuplevel

Re: OT: Re: Help with a bash script please

2011-01-14 Thread Bob Proulx
Adrian Levi wrote: > zparameters="a -mhe=on -pd1ckhead -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on > -si" > zfilename="Daily Backup - $(date +"%a %h %H%M %d-%m-%Y").$backuplevel.tar.7z" Yuck! Look at all of those spaces in the filename! :-) (Recalling all of the discussion over the past couple o

OT: Re: Help with a bash script please

2011-01-14 Thread Adrian Levi
I know where the error lies but not how to fix it. zparameters="a -mhe=on -pd1ckhead -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on -si" zfilename="Daily Backup - $(date +"%a %h %H%M %d-%m-%Y").$backuplevel.tar.7z" When these two expand here: tar $tarparameters $backuppath | 7z $zparameters $zfilena

OT: Re: Help with a bash script please

2011-01-14 Thread Adrian Levi
I have (hopefully) taken on everybody's suggestions, Here is the current script :) #!/bin/sh # Variables: # Determine backup level incrementalfile="/srv/tar_incremental_file" if [ -f $incrementalfile ] then backuplevel="date +%w" else backuplevel="0" rm $incrementalfile > /dev/null 2>&1 fi zpa