10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have a file where I need to change the date format on the nth field from DD-MM-YYYY to YYYY-MM-DD so I can accurately sort the record by dates
From regex - Use sed or awk to fix date format - Stack Overflow, I found an example using nawk.
Test run as below:
$: cat xyz.txt
A ... (2 Replies)
Discussion started by: newbie_01
2 Replies
2. Shell Programming and Scripting
Hi
I want to convert date from one format to the other i.e.
From
Thu Mar 6 15:57:39 2014
To
2014-03-06 15:57:39
Is there any direct command to implement this ? (1 Reply)
Discussion started by: tostay2003
1 Replies
3. Shell Programming and Scripting
In awk how would I flatten input.txt to output.txt?
Input:
givenname: Darth
sn: Vadar
mail: d.vadar@deathstar.com
uid: dv12345
orclguid: 1234567890
givenname: Carlito
sn: Brigante
mail: c.brigante@paradise.com
uid: cb12345
orclguid: 2134567890
Output:
... (3 Replies)
Discussion started by: u20sr
3 Replies
4. AIX
Hi,
I would like to change the incoming date format (Jun 25 2010) to 06/25/2010. I have seen date "dconv" function but i am not sure how that works.
$ echo "Jun 25 2010" |
nawk ' { months=" JanFebMarAprMayJunJulAugSepOctNovDec";date=$1;month=index(months,substr($1,1,3))/3;
... (3 Replies)
Discussion started by: Prashanth B
3 Replies
5. Shell Programming and Scripting
Hi,
I have some files being sent to me that have dates in them in this format:
from
1/8/2011 15:14:20
and I need the dates in this format (mysql date format)
To
2011-01-08 15:14:20
all I have so far is the regexp that detects the format:
sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Discussion started by: Astrocloud
7 Replies
6. Shell Programming and Scripting
Seek help in coverting date from mm_dd_yy to mm_dd_yyyy.
I get a date in a file some thing file like this
09_14_11.pdf
Need to convert the same to
09_14_2011.pdf
:wall: (9 Replies)
Discussion started by: aakishore
9 Replies
7. 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
8. UNIX for Advanced & Expert Users
Hi,
I would like to convert the output from awk function to date and print on the screen.
Example : echo "Start Date: May 24 2010" | gawk -F": " '{print $2}'
Output : May 04 2010
I want this to be converted to 2010/05/24
Can i use date function here and how?
Thanks,
Deepika (2 Replies)
Discussion started by: deepikad
2 Replies
9. 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
10. 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