date time stamp help please

From: Smokey Joe (oldsmokee_at_yahoo.com)
Date: 01/31/05


Date: Mon, 31 Jan 2005 19:33:43 GMT

i have a short script that works on unix and suse linux but not on
redhat.

dt=`date +%C%y%m%d%H%M%S`
cp $1 $1.${dt}
just trying to date and time stamp it before deleting the original.
On redhat the file name ends up with 2 question marks at the end of
the date and time stamp "file.20050131125201??" It turns out the
question marks are \r\r. What am I doing wrong?

Thank You
Smokey



Relevant Pages

  • extra characters in date ????
    ... i have a short script that works on unix and suse linux but not on ... just trying to date and time stamp it before deleting the original. ... On redhat the file name ends up with 2 question marks at the end of ...
    (linux.redhat)
  • Re: extra characters in date ????
    ... > just trying to date and time stamp it before deleting the original. ... > redhat the file name ends up with 2 question marks at the end of the ... Make sure that the file has UNIX-style line endings, ...
    (linux.redhat)