01-29-2008
To get to that midlle field... and start a case statement...
Use today as an example to have a date in the format of the question
Store to mm the 2nd part (month) of the date
You could then do a case on $mm
> idtx=$(date '+%d/%m/%Y')
> echo $idtx
29/01/2008
> mm=$(echo $idtx | cut -d"/" -f2)
> echo $mm
01
>
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everybody:
Could anybody tell me how I convert from a julian date, with shell comands, to gregorian.
Thanks in advance. (2 Replies)
Discussion started by: tonet
2 Replies
2. Shell Programming and Scripting
file1
E106,0,1/9/1993,0,E001,E003,A,45200,3766.667,21.730769
E108,0,2/3/1995,0,E001,E003,A,15000,1250,7.211538
E109,0,06-mar-07,0,E001,E001,A,78000,6500,37.5
E110,0,09-dec-2008,0,E001,E001,A,56000,4666.667,26.923077
E104,0,06/04/1994,0,E001,E003,A,95000,7916.667,45.673077... (14 Replies)
Discussion started by: charandevu
14 Replies
3. Shell Programming and Scripting
Hi,
Does anyone know (in KSH, CSH, SED or AWK), how to convert date text in a file from:
EX:
May232008
to:
05232008
Thanks, (3 Replies)
Discussion started by: jgrant746
3 Replies
4. Shell Programming and Scripting
Hi
I want to convert MAY 05 2005 01:15:00PM date format to 2005/05/05 01:15:00PM .
CAn somebody suggest me a code ,I am new to unix shell programming.
Thanks
Arif (21 Replies)
Discussion started by: mab_arif16
21 Replies
5. Shell Programming and Scripting
Hi,
I have the string YYYYMMDDHHMMSS like 20090801204150 and I need to convert it using the unix command date in the format:
date "Saturday, 1 August 2009 20:40:59"
All in one single Unix line if this is possible. What's the correct syntax?
Steve Hagi (6 Replies)
Discussion started by: hagimeno
6 Replies
6. Shell Programming and Scripting
Hi Gurus,
Need help in Conversion of date(2007-11-30) to Julian date(YYDDD)...
'+%J'
2007-11-30 to 'YYDDD'
Thanks (4 Replies)
Discussion started by: SeenuGuddu
4 Replies
7. UNIX for Dummies Questions & Answers
(string(8)) ((date("YYYYMMDD")) ((date("YYYY/MM/DD")) in.date_field_name)) (1 Reply)
Discussion started by: dr46014
1 Replies
8. Shell Programming and Scripting
Hi all,
I require to convert julian date to normal calander date in unix
for eg julian date=122
now i want corresponding calander date
----------------------------------------
gr8 if give very small command/script
and please explain the steps as well(imp)
Thanks
... (3 Replies)
Discussion started by: RahulJoshi
3 Replies
9. Shell Programming and Scripting
Trying to convert dates using a Perl Script but it has to accept formats like
3 letter month, day and year like Nov 02 2010 or 1/4/11 or 21 Feb 2011 and have it convert to something like October 20, 2011. Any ideas? (2 Replies)
Discussion started by: reduxeffect81
2 Replies
10. UNIX for Beginners Questions & Answers
Hi ,
we have a string with yyyymmdd format .
how to know which date it is ?
example:20120712-->sunday
20150228-->saturday
20140431-->invalid
please suggest commands which work on below
os : SunOS 5.10
shell: bash shell
Thanks,
Srinath. (10 Replies)
Discussion started by: srinadhreddy27
10 Replies
sdate(1) Debian manual sdate(1)
NAME
sdate - never ending September date
SYNOPSIS
sdate [-e|--epoch yyyy-mm] [-l|--lib library] [--] [command]
DESCRIPTION
sdate runs a command in an environment wherein it wraps the libc localtime() and gmtime() calls such that the program will use the eternal
September date. The wrapper functions are in a shared library /usr/lib/libsdate/libsdate.so* which is loaded through the LD_PRELOAD mecha-
nism of the dynamic loader. (See ld.so(8))
OPTIONS
-e yyyy-mm, --epoch yyyy-mm
Specify an alternative epoch, default is 1993-09.
-l library, --lib library
Specify an alternative wrapper library.
[--] command
Any command you want to be ran. Use '--' if in the command you have other options that may confuse sdate's option parsing.
-h Display help.
-v Display version.
FILES
/usr/lib/libsdate/* The shared library containing the wrapper functions.
ENVIRONMENT
LD_PRELOAD
LIMITATIONS
Library versions
Every command executed within sdate needs to be linked to the same version of the C library as sdate itself.
SEE ALSO
http://www.catb.org/~esr/jargon/html/S/September-that-never-ended.html
http://www.df7cb.de/projects/sdate/
COPYING
sdate is distributed under the GNU General Public License. (GPL v2 or later).
AUTHORS
Christoph Berg
<cb@df7cb.de>
Debian Project 4620 September 1993 sdate(1)