I have a databasedump with appr. 6.0000 lines. They all look like this:
{"student”:”12345”,”achieved_date":1576018800,"expiration_date":1648677600,"course_code”:”SOMECODE,”certificate”:”STRING WITH A LOT OF CHARACTERS”,”certificate_code”:”ABCDE,”certificate_date":1546297200}
"STRING WITH A LOT OF CHARACTERS" is a string with around 600.000 characters (!)
I need those characters on each line removed... I tried with:
sed 's/certificate\":\"*","certificate_code//'
But it seems it did not do the trick.
I also couldn't find an answer to work with here, so reaching out to you, hopefully you can help me.. is this best done with SED? or any other method?
For now I don't care if the all the characters on "STRING WITH A LOT OF CHARACTERS" are removed or replaced by I.E. a 0, even that would make it workable for me ;)
The output for od -xc filename | head
is:
0000000 2d2d 4d20 5379 4c51 6420 6d75 2070 3031
- - M y S Q L d u m p 1 0
0000020 312e 2033 4420 7369 7274 6269 3520 372e
. 1 3 D i s t r i b 5 . 7
0000040 322e 2c39 6620 726f 4c20 6e69 7875 2820
. 2 9 , f o r L i n u x (
0000060 3878 5f36 3436 0a29 2d2d 2d0a 202d 6f48
x 8 6 _ 6 4 ) \n - - \n - - H o
0000100 7473 203a 3231 2e37 2e30 2e30 2031 2020
s t : 1 2 7 . 0 . 0 . 1
hope you can help me!