![](https://seccdn.libravatar.org/avatar/fef91d3f1fb07633b34f80885eed84c7.jpg?s=120&d=mm&r=g)
Your setting of "myvar" is wrong. Change to read: myvar=`date -u +%T` That is, add the "backquote" around the date expression. This will set "myvar" the the "contents" or "evaluation" of the information between the backquotes. -=[cwa]=- On Mon, 26 Mar 2001, rob wrote: :)Im trying to create a variable file name, so I can make incremental :)backups of log files :) :)myvar=date -u +%T :) :)gzip /var/log/messages /root/$myvar :) :)#then :) :)cat /var/log/messages | tail -n 1 > /var/log/messages :) :)# this wipes out the file leaving only one line :) :) :)on the gzip line, I get an error "filename ambigously defined" :) :)can anyone shed so lite on this? How can I easily assign fairly random :)unique filenames? :) :)many thanks :)rob :) :) -- Christopher W. Aiken Scenery Hill, Pa, USA chris at cwaiken dot com www.cwaiken.com SuSE 7.1 Professional Linux