0
{

    "original_timestamp" : 1493663888791,
    "service_name" : "AMBARI",
    "state" : "CRITICAL",

  }
},
{
   : {

    "original_timestamp" : 1498747386666,
    "service_name" : "AMBARI",
    "state" : "CRITICAL",

  }
},
{
   : {

    "original_timestamp" : 1496239776423,
    "service_name" : "AMBARI",
    "state" : "WARNING",

  }
},

this is text file, I want to search original_timestamp and change timestamp to date format, How to do with using unix awk command ? I do not want to use jq utility

Utsav
  • 5,572
  • 2
  • 29
  • 43
  • If you do want to use `jq` then, obviously, tag your question with `jq` to attract some `jq` experts to look at it. Are you sure your posted input is valid JSON, btw? – Ed Morton Jul 04 '17 at 02:45
  • You write "How to do with using unix awk command ?" Then you write "I do want to use `jq`." Did you mean I do NOT want to use `jq`? If are are looking for an `awk` solution, do you have access to `gawk`? Check with `awk --version` and edit your Q to show that output. BUT you can also search here for `[awk] unix timestamp convert` and you'll find many solutions. Good luck. – shellter Jul 04 '17 at 03:24
  • oh sorry i missed 'not', actually i do not want to use jq, thanks for pointing out. – user3185460 Jul 04 '17 at 07:21
  • If you make a mistake when posting a question then [edit] the question to correct that mistake, don't leave it there and hope someone's going to read through the comments to figure out what you meant. – Ed Morton Jul 04 '17 at 12:48
  • Possible duplicate of [Convert from Unix time at the command line](https://stackoverflow.com/questions/3249827/convert-from-unix-time-at-the-command-line) – Liesel Jul 05 '17 at 05:27

0 Answers0