>  for filestotar in `ls --almost-all --directory -x1 *`
>         do
>                 if ["$filestotar" != "advserver"]; then

You need an extra space or two here:
                  if [ "$filestotar" != "advserver" ]; then
Think of ``['' as a command, and the rest of the stuff as arguments
to it.

>                         #!tar --directory /backup/tar.archive --create
> --verbose --file test.tar /backup/$filestotar/*
>                         counter=`expr $counter + 1`
>                 fi
>         done 

If I understand what you're trying to do correctly, then you might want
to look up the --exclude option to tar.

Steven Smith,
[EMAIL PROTECTED]

Attachment: msg02391/pgp00000.pgp
Description: PGP signature

  • Script Paul Kraus
    • Steven Smith

Reply via email to