On Sun, 14 Mar 1999 [EMAIL PROTECTED] wrote:

> Afio is definitely the best backup program I've used so far - I've
> attached the script I use to make backups of my system with it.
> 
>  find . -depth -print | grep -v '^./var/spool' | 
>  grep -v '^./usr/local/src' | grep -v '^./proc' | grep -v '^./tmp' |
>  grep -v '^./var/tmp' | grep -v '^./home/morph/lprtemp' >
>  /tmp/full.filelist

Why not use a single grep instead of all these greps:
  grep -v -e '^./var/spool' -e '^./usr/local/src' -e '^./proc' \
          -e '^./tmp' -e '^./var/tmp' -e '^./home/morph/lprtemp' 

I think this is clearer (speed is barely affected due to massive io).

>  echo -e " done."
>  echo -e "Starting Backup... \c"
>  cat /tmp/full.filelist |
>  afio -o -b 10k -c 1000 -s 1544m -Z -G 4 -z /dev/qft0

This is UUOC (Usless Use Of Cat), you could have used plain file
redirections instead of cat. 

  afio ...... < /tmp/full.filelist 

or (I find it harder to read)

  < /tmp/full.filelist   \
  afio .......

You can read more on news://comp.unix.shell

Here, it does not affect speed (massive io), but it is a bad coding
practice.

  Michael


P.S. If you object to UUOC, please mail me directly to avoid flame wars.
     All I wanted was to point out some things that I did not like in the
     script (Only a matter of taste).

Reply via email to