Use awk with a flag to trigger the print when necessary:
$ awk '/abc/{flag=1;next}/mno/{flag=0}flag' file
def1
ghi1
jkl1
def2
ghi2
jkl2
How does this work?
/abc/ matches lines having this text, as well as /mno/ does.
/abc/{flag=1;next} sets the flag when the text abc is found. Then, it skips the line.
/mno/{flag=0} unsets the flag when the text mno is found.
The final flag is a pattern with the default action, which is to print $0: if flag is equal 1 the line is printed.
For a more detailed description and examples, together with cases when the patterns are either shown or not, see How to select lines between two patterns?.
-
https://stackoverflow.com/questions/17988756/how-to-select-lines-between-two-marker-patterns-which-may-occur-multiple-times-wThe event loop is different than models in many other languages where additional threads may be created to handle concurrent work.
-
https://nodejs.org/en/docs/guides/blocking-vs-non-blocking/à tester sur serveurs perso
via pierrick
-
https://github.com/netdata/netdata"prometheus only pull"
On peut aussi faire du push de manière détournée
-
https://github.com/prometheus/pushgateway/blob/master/README.mdnot bad! better than unprotected socket access ;)
-
https://medium.com/lucjuggery/docker-tips-access-the-docker-daemon-via-ssh-97cd6b44a53?mkt_tok=eyJpIjoiTmpZNE5HWXdOVFJtWkRWbCIsInQiOiI1b0Zsb1RkNk4rXC9qSWtyajFCN3RsSERRQytkSk0wRzZkQ3dRU3g0eXM0YUV3R3RWM1dpb3dqNXpYVjc4MUlNMmpcL1ZIeGdLbk1yQjZYZjNIbjczOTBLOUY4YlBsSUVQRVZwMUg5bGZnNlRHOXpTaFdhdkIydnhmTFd1V0JyRE50In0%3Dpour ne pas bufferiser l'ouput d'un script python et avoir le résultat en direct dans un | tee -a :
python -u script.py | tee -a mon.log
-
https://links.infomee.fr/?F1LIUA