[plug] add date to file

Russell Steicke r.steicke at bom.gov.au
Thu Apr 17 23:12:50 WST 2003


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



-- 
Russell Steicke

-- Fortune says:
Never reveal your best argument.



More information about the plug mailing list