Solved

Easy Question:  Using the Date Command in a script

Posted on 2004-09-15
2
172 Views
Last Modified: 2010-05-18
I'm new to linux scripting and Im trying to use the Date command in my script but can't completely figure out what the problem is.  I'm trying to have it show the Month Day, Year.  So for example today it would show  Sep 15, 2004.  I have it in my script as

date +%h +%d +%Y

but I get a "too many non-option arguments" error, and also how can I put in the comma to seperate the day from the year?

Thanks
0
Comment
Question by:kevin_ma
2 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 500 total points
Comment Utility
The + switch specifies a format "string", try
date +"%h %d, %Y"
0
 

Author Comment

by:kevin_ma
Comment Utility
Thanks it works!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now