Timeline for sed replace block of yaml code with nothing
Current License: CC BY-SA 4.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 21, 2023 at 10:17 | comment | added | Marcus Müller |
("it's impossible", "sophistication that sed doesn't have": these are results from math/theoretical computer science. It's not a "it's more effort than it'd be worth", it's a "the tool you have is provenly incapable of fulfilling the task, says math")
|
|
| Mar 21, 2023 at 10:12 | comment | added | Marcus Müller |
I did. That argument comes up so often... hence: my first paragraph. YAML is not a regular language, you literally can't parse all of YAML with sed, it's impossible. And even if you happen to have a subset of YAML for which you can, installing these tools is much easier than trying to deal with all the ways your regular expression can land face-first in the dust. So, really, nah, get over it and use proper tooling. There's also nothing wrong with just using python with import yaml, for example. But any software that deals with this type of data needs sofistication that sed doesn't have
|
|
| Mar 21, 2023 at 10:10 | review | Low quality posts | |||
| Mar 21, 2023 at 10:23 | |||||
| Mar 21, 2023 at 10:08 | comment | added | xerxes | Did you think maybe I don't want to have to install other tools and have other dependencies? | |
| Mar 21, 2023 at 9:54 | comment | added | xerxes | It's not terraform | |
| Mar 21, 2023 at 9:17 | history | edited | Marcus Müller | CC BY-SA 4.0 |
added 79 characters in body
|
| Mar 21, 2023 at 9:14 | comment | added | Chris Davies |
Gotcha. My version doesn't need to the -y flag at all
|
|
| Mar 21, 2023 at 9:12 | comment | added | Marcus Müller | I'll try with yours as well | |
| Mar 21, 2023 at 9:12 | comment | added | Chris Davies | Ah ok! For now I'm going to leave my first comment in place (I've added a link to the version I had) but I'll delete this one. Just acknowledging your comment, really! Thanks. | |
| Mar 21, 2023 at 9:12 | history | edited | Marcus Müller | CC BY-SA 4.0 |
added 56 characters in body
|
| Mar 21, 2023 at 9:10 | comment | added | Marcus Müller |
ah, sorry, there's actually two yq, @roaima. For mine it re-converts to yaml (it uses jq underneath). Y
|
|
| Mar 21, 2023 at 9:10 | comment | added | Chris Davies |
My version of yq (4.32.2, updated from github just a couple of minutes ago) doesn't have -y. What does it do?
|
|
| Mar 21, 2023 at 9:02 | history | answered | Marcus Müller | CC BY-SA 4.0 |