#!/bin/bash filename="abc.$(date "+%Y%m%d")" echo $filename ------>8-----8<------- :) -d Lang Zhi wrote: > Hi. > I need to backup some files every day. So, we use cron right ? > The file format is like this : abc.20000519. > So the next day, the new backup file will be named abc.20000520 and so on. > > The problem here is, how do i get the "20000520", "20000521" and ... ? > This is actually the current date. I try to use the "date" , then "cut" and > "tr" it, but it doesn't work.
- [expert] A simple script Lang Zhi
- Re: [expert] A simple script David Ford
- Re: [expert] A simple script Phil Edwards
- Re: [expert] A simple script Charles Curley
- RE: [expert] A simple script Ron Greer
- Re: [expert] A simple script Harlan Whitley
