Re: Date from the time stamp
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- Date: 28 Sep 2006 16:22:50 GMT
On 28 Sep 2006 08:46:10 -0700, pawan_test wrote:
i have a time stamp. from that i am trying to awk to get the year,[...]
month and date.
TIME=20060614092446
DESIRED OUTPUT: 20060614
i am doing the following;
TIME=20060614092446
$ TimeStarted=`expr match '$TIME' '.*\(......\)'`
echo $TimeStarted
i am not getting any output. can anyone please suggest me.
set $(echo "$TIME" | fold -w2)
y=$1$2
m=$3
d=$4
--
Stephane
.
- References:
- Date from the time stamp
- From: pawan_test
- Date from the time stamp
- Prev by Date: Date from the time stamp
- Next by Date: Remove the first 3 characters after reading each line
- Previous by thread: Date from the time stamp
- Next by thread: Re: Date from the time stamp
- Index(es):