?
Solved

Easy Question:  Using the Date Command in a script

Posted on 2004-09-15
2
Medium Priority
?
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
brettmjohnson earned 2000 total points
ID: 12070811
The + switch specifies a format "string", try
date +"%h %d, %Y"
0
 

Author Comment

by:kevin_ma
ID: 12071191
Thanks it works!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

718 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