Yeah, I ended up using awk, which solved my problem perfectly. I was just curious if I could do that with sed, but it seems too complicated. Thank very much, guys!

Using sed to match regexp patterns in a file with a fixed string (not the other way around)
Hi there!
Usually, sed can be used in different ways, but most of the time we use it to match lines in a file against a fixed regexp. Some examples:
This replaces ocurrences of regexp for "foo":
undefined
sed 's/regexp/foo/g' < myfile
This prints all lines that have "foo", but will change the first "o" in the line for an "a":
undefined
sed -n '/foo/s/o/a/p' < myfile
and so on...
But I tried to do a different thing, with no success: can I pass to sed a file with a bunch of regular expressions and test them against a fixed string? I tried to play with pattern space, hold space, with no success. It just seems impossible to use them (which would be the closest to "variables") in search commands.
I know sed is Turing complete, but using it that way would maybe require to implement a regexp engine from scratch?
Thanks!

Does Driver (PS1) and other games limit their own speed sometimes?
Hi. I'm playing emulated Driver using pcsxr on Linux. Sometimes, when I'm being chased by three or more police cars for example, I'm observing a drop rate (from ~59 fps to ~45 fps). I first thought my computer (which is an old i3 540!), but I soon changed my mind because of two reasons:
- I was playing 1080p, but when I decreased resolution to 480p, this problem persisted.
- When I disabled emulator frame rate limiting, it jumped to ~120 fps and it dropped to only ~90 fps on other situations. Well, it is impossible to play the game in this situation as it seems you are playing in fast-forward mode.
Because of that, I thought that the game itself could be dropping frames in some situations. Maybe it is considering the limitations of original PS1 hardware and prefer to drop frames instead of delaying the game itself? If this is right, it is impossible to "fix" it changing the emulator configuration. Unfortunately I have no PS1 original hardware to test it myself.
Thanks!
P.S.: I r
Pelo que entendi tem que copiar as configurações de group_vars/all.yml
para inventories/<suamaquina>/group_vars/nas.yml
e alterá-las nesse arquivo, conforme as suas necessidades né?
Olha, eu aprendi tudo lendo a documentação oficial mesmo (em inglês). Mas passa aqui o erro que tá dando ou a dificuldade que você tá tendo, quem sabe a gente consegue te ajudar.
Aqui tá normal.
Olás. Você já está escrevendo o próprio playbook ou está usando algo pronto? Sem trecho de código ou mensagens de erro fica difícil de saber qual o problema.
How do you store database secrets for an application in your source code management system?
Hi. We successfully store secrets in ansible variables files with either ansible-vault or sops. It is a good approach when Ansible itself configures something that requires a secret, such as configuring a database admin password.
But I'd like to ask you about how you store secrets meant to be used by applications. Example: we have a an application in PHP with a config.php file with all credentials needed by the application. Developers have a config.php setup to work with the test environment, while we maintain a different config.php
for production in production machines. Nowadays this config.php
file is stored in ansible repository, encrypted by ansible-vault or sops. We thought about moving the config.php
production file to the application repository, so we could get advantage of the CI/CD pipeline.
It doesn't smell right, because it would require to encrypt it somehow, and store keys to decrypt it in CI/CD, but I decided to ask you anyway wh
Mechanical pencils: Pentel Smash or Pentel Graphgear 500?
The Pentel Smash mechanical pencil is usually compared to the Pentel Graphgear 1000, but I'd like to ask you comparing Smash to Graphgear 500.
Where I live, both are expensive mechanical pencils, but Smash is 70% more expensive and, IIUC, more professional. I'd like to know whether it pays to choose Smash over Graphgear 500 or both are kind of similar so I should go to Graphgear 500.
Do you know them? How do you compare both?
Thanks!