bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Formating variable with caracter and date.


From: Dolphin06
Subject: Formating variable with caracter and date.
Date: Fri, 12 Dec 2008 02:54:56 -0800 (PST)

Hello all,

I would like to give a variable a value which have a format like this one:
<3 letters>-<date>-<digit>
<date> should be yymmdd.  Date of the day by default.
How would i do this, i know the date command is date +"%y-%m-%d", but i dont
know the syntax for mixing letters date and digit into one variable.
Also i would like to give the user a chance to change this default value, by
letting him enter one, so i would like to know how can i check if the
entered value is in the correct format.

Thank you for helping.
-- 
View this message in context: 
http://www.nabble.com/Formating-variable-with-caracter-and-date.-tp20973500p20973500.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]