On 14 Mar, Veksler Michael wrote:
>
>
> 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 like your method of doing this better than mine - I was unaware that
you could load the -v option - does this get garbled without the -e
option?
> 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.
>
> Here, it does not affect speed (massive io), but it is a bad coding
> practice.
>
> 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).
>
One of the things I like about unix like o/s's is that there's usually
101 ways to do the same thing :-) Taste is personal, everyone's
entitled to have different taste :-)
--
Pete
[EMAIL PROTECTED]
----------------------------------------------------------------
Linux Registered User # 100652 - Uptime 15 hours, and counting...
-- What's another word for thesaurus? --