Solved

Append Sysdate in Unix

Posted on 2002-04-08
5
1,346 Views
Last Modified: 2012-05-04
I am writing a shell script.

I wanted to append a file with the sysdate on it. Can someone help me with the unix command.

I tried mv filename filename'date'.out

Thanks all
0
Comment
Question by:cyberonics
5 Comments
 
LVL 6

Expert Comment

by:bira
ID: 6925780
mv filename filename`date`.out
0
 
LVL 6

Accepted Solution

by:
bira earned 5 total points
ID: 6925792
Or
  a=`date +"%d-%m-%Y"`
  mv filename filename$a.out
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6925920
mv filename filename`date +"%Y%m%d"`.out
0
 
LVL 20

Expert Comment

by:tfewster
ID: 7833622
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by bira

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster (I don't work here, I'm just an Expert :-)
0
 

Expert Comment

by:modulo
ID: 7909013
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem Imaging Computers With Clonezilla 2 90
Linux performance issues with 100% swap usage, etc 15 93
how to check for shares on HP-UX 1 59
UNIX SCP 5 77
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question