Date time stamp help please
05/12/2018 15:30
i have a short script that works on unix and suse linux but not onredhat.

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 ofthe date and time stamp file.20050131125201?? It turns out thequestion marks are . What am I doing wrong? Thank YouSmokey

Source is Usenet: alt.os.linux.redhat
Sign in to add a comment

Answer score: 5
05/12/2018 15:30 - -----BEGIN PGP SIGNED MESSAGE-----Hash: SHA1 | 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 . What am I doing wrong? That script seems to work just fine for me, and I'm running Fedora Core3. Have you specified a shell at the top of the script (e.g. #!/bin/bash)? Jeff - --Add an underscore between 'd' and 's' and remove the first threeletters of the alphabet for email.

-----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.6 (GNU/Linux)Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAuwLlRbyBxB9qBwRApebAJ9q7OqQYtrR/O4F2MkNXoyekFv32QCcC/cJ+jazsgVHataWog9IEn4tAys==RX9o-----END PGP SIGNATURE-----

Source is Usenet: alt.os.linux.redhat
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below