• 4 Posts
  • 76 Comments
Joined 1 year ago
cake
Cake day: June 30th, 2023

help-circle
  • No, you’re still misunderstanding what’s being done. ${server_service} is an injected string, the string is the whole contents of the file. That file is not stored locally on the server, except through being injected here(by a terraform file template). And no, printf won’t be any better than echo because its not format string, and I don’t want any formatting from printf applied to it.


  • I’m reading this and interpreting that line 27 of that script is

    And your interpretation is wrong. Line 27 is actuallly

    sudo echo "${server_service}" > /lib/systemd/system/server.service

    ${server_service} is read from the file I posted in the 2nd image. Since it was a test script I hadn’t bothered implementing any escaping tools, I wanted to make sure terraform allowed this first.





  • No, because neither of those are the inputs. The input was the systemd file in the image. The whole command was not printed in the error, only surrounding context. The single-quote was indicating the ending of that context(because it was the end of the line) printed by the error.

    The same thing was done with `)' on the first line of error



  • Sadly no, its injected with terraform templatefile, I already looked for a normal way to autoescape it, but from a brief look I couldn’t find one. I know there is a replace function that can take regex(RE2, which from my understanding prohibits * in lookbehinds)- but the simplest regex I could think of at nearly 6am for capturing only non-escaped quotes is /(?:^|[^\\])(?:(?:\\\\)+|[^\\]|^)(?'quote'")/gm. Though, I just realized if the quotes are escaped I would want to double escape them, so actually replacing all quotes with escaped quotes should be fine, also another limitation of this method is lines can’t have trailing \








  • If given infinite resources, yes. I answered you.

    I again didn’t ask that. Its also not true for all populations(such as human populations)

    The current population will likely be zero, perhaps simply approaching the limit of zero if tardigrades and extremophiles survive. But in terms of multicellular life, yeah, there can be a zero for sure.

    I did ask if there can be either. I asked why you assume it would be.

    It would be cool if our ozone was working perfectly, then, huh? But it’s not any more, and is getting worse:

    That source seems to indicate that they’re not entirely sure why it is getting worse, but it is a combination of factors. However NASA and the the UN say recovery of the ozone layer is still on track for 2040.


  • If a population is given infinite resources, sure, theoretically.

    I didn’t say they were given infinite resources. I said if a population is growing exponentially does that mean it will continue to do so.

    The energy that comes from the sun is cumulative and may as well be considered infinite since the sun isn’t going out any time soon.

    Yeah?

    Did you really think that was a gotchya?

    What? It was a question you didn’t answer. Why do you assume just because something is exponential that it will continue. Another example- transistor size in processors exponentially shrinks. Does that mean eventually it’s going to reach zero nm? (hint the answer is no)

    I’m also not saying that this disproves something can exponentially fall to zero. I’m just saying, stating the current relationship doesn’t guarantee it will continue.

    Look at every other planet. That ours happens to be energetically at a temp to support life is the exception.

    Earth is very far removed from other planets in terms of atmospheric conditions.