Why is this failing?

I want to test two files, source and target. If the target does not exist,
or the target does exist but is older than the source, I want to copy the
source to the target.

If the target does not exist, the file is copied. If the source is newer,
no copy occurs.

The code is:


if [ /etc/fstab -nt $metatada/fstab ] || [ ! -f $metadata/fstab ] ; then
echo "Copying $metatada/fstab in from /etc."
cp /etc/fstab $metadata;
fi


ccurley@charlesc $ bash --version
GNU bash, version 2.03.16(1)-release (i586-mandrake-linux-gnu)
Copyright 1998 Free Software Foundation, Inc.


-- 

                -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

Reply via email to