![](https://seccdn.libravatar.org/avatar/fa257a20c9cd66d6018bc58a864ea52a.jpg?s=120&d=mm&r=g)
26 Mar
2001
26 Mar
'01
14:09
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