I need to replace one line in a ton of . json files
![](https://hexbear.net/pictrs/image/d7a47241-ee44-4d5e-9d92-5331021a89c7.jpeg)
![](https://lemmy.ml/pictrs/image/q98XK4sKtw.png)
I'm updating foundry to a version 11 and it broke an ass ton of my assets cause they're all "verified version 10"
So all I have to do is change that number, they're just maps so no need to update anything else, but I have like 400+ files to convert all in individual folders.
Please tell me there's an easy way to do this. (I'm on Linux obviously)
You are viewing a single comment
This, unless you want to mess with jq
Yeah, jq doesn't edit files, right? You'd have to have temp files or something? jq is so good handling json, I wish there was a way of using it to edit files.
You really want to do it that way anyway.. process the files to a new set of files. That way when you screw it up going back is just deleting the new files, fixing and rerunning.
Output redirect back into the file
That'll give you an empty file 🙂
Typical rookie mistake :D
Oh yea, you’re right