3

Lets say I have file something like this:

{"c_me": "2018-02-02T14:48:21.267790Z","et": "192.168.2.6:34097"}

And I want the file to be

{
  "c_me": "2018-02-02T14:48:21.267790Z",
  "et": "192.168.2.6:34097"
}

How can I do this in a short way?

4
  • jq . your-file ? Commented Apr 16, 2018 at 9:39
  • in only makes output, but I need to change a file Commented Apr 16, 2018 at 9:42
  • jq . your-file > your-file.tmp ; mv your-file.tmp > your-file Commented Apr 16, 2018 at 10:36
  • thanks very much, it works Commented Apr 16, 2018 at 11:16

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.