[plug] add date to file

Jon Miller jlmiller at mmtnetworks.com.au
Fri Apr 18 00:03:53 WST 2003


Thanks for that.

On Thu, 2003-04-17 at 23:12, Russell Steicke wrote:
> On Thu, Apr 17, 2003 at 11:09:39PM +0800, Jon Miller wrote:
> > I believe I read somewhere where one could add the current date as a
> > string in a file.  What I need is a method of adding the current date in
> > the beginning of a file.  Can someone point me in the right direction.  
> 
>   #!/bin/sh
>   TempFile=/tmp/date-file-$$
>   date > $TempFile
>   cat $1 >> $TempFile
>   mv $TempFile $1
-- 
Jon Miller <jlmiller at mmtnetworks.com.au>
MMT Networks Pty Ltd




More information about the plug mailing list