On Tue, 3 Oct 2000, e. pareja wrote:
> On Tue, 3 Oct 2000, Ronald Warner wrote:
> 
> > I am trying to create a script that will add a date extension to a file. 
> >  For example, test become test.10032000.  I have the following in a 
> > file called ds.
> > 
> > td='date "+%m%d%Y"'
> > mv $1 $1.$td
> > 
> > and its not giving me the correct results...  
> 
> shouldn't that be:
> 
> td=`date "+%m%d%Y"`
> mv $1 $1.$td
> 
> The shell interprets the single back quote differently from a single
> quote. 

even shorter code for that would be:

mv $1.`date "+%m%d%Y"`

consumes one line and does not use up environment. ;)

eric
--
eric pareja ([EMAIL PROTECTED]) <O> Here, have a clue. Get the picture.
PGP key at htp://gra.ph/~xenos/xenos.pusa.pgp <|PLUG|> http://gra.ph
"Knowledge is inherently precious even if you can't sell it."
   - Dr. Greta Penninger in Bruce Sterling's "Distraction"



_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to