Originally posted by: SystemAdmin
Greetings to the forum..
im very new to AIX and have been trying to get a simple script working.my purpose is to backup a directory on tape and compress the log that the process creates.so i have done something like.
find . -print | backup -viqf /dev/rmt0 | tee /home/bfi/testfile_`date +%Y_%m_%d`.log
but i want to be able to compress that .log file.how is it possible to set a variable on that file and then use compress $myvar and do the job?
i tried sth like find . -print | backup -viqf /dev/rmt0 | myvar=$(tee /home/haroulis/testfile_`date +%Y_%m_%d`.log)
but myvar ends up having all filenames of the directory. since that would occur daily and therefore my filename would be different and i dont know of way to always set myvar$ to be that file so i can pass it on to compress.
im using bash on aix 5.3
thank you.