Hi Arturs,
Enclose your variables in {}. I'd suggest you do this (and make
it habit :) when you use variables in shell scripts...
E.g.:
nice -18 find . -print \
| grep -v ${LOGFILE} \
| grep -v /proc/ \
| grep -v /mnt/floppy/ \
| grep -v /mnt/cdrom/ \
| tee -a ${LOGFILE} \
| cpio -ov -Hcrc | gzip -4 > ${BCKFILE}
See man bash(1):
[...]
${parameter}
The value of parameter is substituted. The braces
are required when parameter is a positional parame-
ter with more than one digit, or when parameter is
followed by a character which is not to be inter-
preted as part of its name.
[...]
On Tue, Aug 22, 2000 at 12:21:01PM +0200, Arturs Korneevs wrote:
>
> Could you tell me why I cannot see list of files on my screen and in log ?
> I see only:
>
> [root@aurum /root]# ./fullbackup
> Servera aurum kopesanas sakums Tue Aug 22 12:01:12 EEST 2000
> Kopetie faili:
>
> Servera aurum kopesanas beigas Tue Aug 22 12:47:31 EEST 2000
>
>
> SCRIPT:
> umask 077
> mt -f /dev/nst0 rewind
>
> HOSTNAME=aurum
> BASENAME=$HOSTNAME.`date +%Y%m%d.%H%M`
> LOGDIR=/var/admin/backup/latest
> LOGFILE=$BASENAME.log
> ROOTDIR=/
> BCKFILE=/dev/nst0
>
> echo "Servera" `hostname` "kopesanas sakums" `date` | tee $LOGFILE
> echo "Kopetie faili:" | tee
>-a $LOGFILE
>
> cd /
> nice -18 find . -print \
> | grep -v $LOGFILE \
> | grep -v /proc/ \
> | grep -v /mnt/floppy/ \
> | grep -v /mnt/cdrom/ \
> | tee -a $LOGFILE \
> | cpio -ov -Hcrc | gzip -4 > $BCKFILE
>
> echo "Servera" `hostname` "kopesanas beigas" `date` | tee -a $LOGFILE
>
> mt -f /dev/nst0 offline
--
.--. Michael J. Maravillo office://+63.2.894.3592/
( () ) Q Linux Solutions, Inc. http://www.q-linux.com/
`--\\ Open Source Consultancy / Support / Training / Software Dev't.
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list