Multiple records need to convert UNIXtime to human readable datatime and all output in one format


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Multiple records need to convert UNIXtime to human readable datatime and all output in one format
# 1  
Old 04-04-2013
Multiple records need to convert UNIXtime to human readable datatime and all output in one format

Hello Experts,

Below is the record i have:
Moderator's Comments:
Mod Comment sample data attached


I want this record of each row to be in single line and there are multiple rowise unixtime mentioned e.g 11996327 , This needs to be converted to Human readdable data and time from multiple rows

Can you help me , it will be big tme help to all Shell Genius Heroes

Last edited by radoulov; 04-04-2013 at 10:12 AM..
# 2  
Old 04-05-2013
Quote:
Originally Posted by manishK
Hello Experts,

Can you help me , it will be big tme help to all Shell Genius Heroes

I guess this what you are asking for... (PFA)

Let me know if I'm wrong.

Cheers,
Saps.
This User Gave Thanks to saps19 For This Post:
# 3  
Old 04-05-2013
Code:
sed 's/,/     /g' logfile

# 4  
Old 04-05-2013
Hello

saps19 -->> You are Genius . You have catched what exactly iam looking For .

Can you share the code , it will be Great Help !!!!

Last edited by manishK; 04-05-2013 at 03:42 PM.. Reason: unreadable format
# 5  
Old 04-05-2013
If the file is too long, please attach it as a text file.

BTW, what do you mean you want the records to be in one line? Each record starts with 67xx they are in one line.

About the unix time, yeah that can be worked upon. Did you check saps19 xls?

--ahamed
# 6  
Old 04-05-2013
Hi Manish, manishK

I suggest you, if possible, try not to paste Sensitive log files (i.e. Banking / Telecom / Healthcare etc domain logfiles or production data). Prepare a dummy instead. Smilie

It could be your company's security violation.

Regards,
Saps.
# 7  
Old 04-05-2013
Thanks Saps19 -->> This is not production data , I have created a test lab and from there I have done several tests and thats the data I have presented here ..

ANyways thanks either ...If you can share the code will be much help . The output that have sent
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

How to parse .nessus file to get result in human readable format?

Scripting Language: bash shell script, python I want to parse .nessus file in human readable format. If any one have any ideas please help me. (2 Replies)
Discussion started by: sk151993
2 Replies

2. Shell Programming and Scripting

Convert epoch time stamp into human readable format

Can someone help me to write a shell script to convert epoch timestamp into human readable format 1394553600,"test","79799776.0","19073982.728571","77547576.0","18835699.285714" 1394553600,"test1","80156064.0","19191275.014286","62475360.000000","14200554.720000"... (10 Replies)
Discussion started by: Moon1234
10 Replies

3. UNIX for Dummies Questions & Answers

Display Directories with their sizes in human readable format

Hi, I want to list all the directories present in a particular location and want to display their sizes as well. I know "ls -lh" but it doesn't show the size of the complete directory. So i want something like dir1 266 MB dir2 2 KB dir3 22 MB ... ... file1 10 Kb ..... Thanks Sarbjit (4 Replies)
Discussion started by: sarbjit
4 Replies

4. Shell Programming and Scripting

Convert epoch to human readable date & time format

Hello I have log file from solaris system which has date field converted by Java application using System.currentTimeMillis() function, example is 1280943608380 which equivalent to GMT: Wed, 04 Aug 2010 17:40:08 GMT. Now I need a function in shell script which will convert 1280943608380... (3 Replies)
Discussion started by: Yaminib
3 Replies

5. Shell Programming and Scripting

convert timezone into human output

Hi I have a command which returns a timezone, Ej: root@bsades2: /usr/local/bin # lsuser -a time_last_login israel israel time_last_login=1279032223 Question: I want to parse this timezone '1279032223' into a 'martes, 13 de julio de 2010 16:43:43' from the ksh shell. Is itt possible? ... (3 Replies)
Discussion started by: iga3725
3 Replies

6. UNIX for Dummies Questions & Answers

How to make user's qutoa in human readable format?

$ quota Disk quotas for user cqlouis (uid 1254): Filesystem blocks quota limit grace files quota limit grace /dev/sdb1 64 300000 320000 8 0 0 $ I want to make the output of command quota in human readable format? How to? As we... (2 Replies)
Discussion started by: cqlouis
2 Replies

7. Shell Programming and Scripting

convert unix date to readable format

Dear Experts, I need your help to convert a unix date and time format number in to readable format like dd/mm/yyyy . I have a text file of more than 10,000 records and it is like NAME DATE1 COUNTRY DATE2 ABD 1223580395699 USA 1223580395699... (3 Replies)
Discussion started by: shary
3 Replies

8. Shell Programming and Scripting

script to convert epoch into human-readable

This is what I have to start out with more file 1208217600 1208131200 1193806800 I want to convert the epoch column into a human-readable format. My file has hundreds of these epoch times that I want to loop through and convert. (The epoch time is really the last column of the line) ... (3 Replies)
Discussion started by: snoman1
3 Replies

9. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

10. Shell Programming and Scripting

formatting output in human readable numbers

Hi, The following command provides the usage in 1024-byte blocks du -ks * | sort -n | echo "$1" ... 1588820 user10 2463140 user11 2464096 user12 5808484 user13 6387400 user14 ..... I am trying to produce an output of first coulmn by multiplying by 1024 so that the output should... (11 Replies)
Discussion started by: ghazi
11 Replies
Login or Register to Ask a Question