Re: sed(1) and line number 0

2021-08-14 Thread Andreas Kusalananda Kähäri
On Fri, Aug 13, 2021 at 11:19:16PM +0800, Philippe Meunier wrote: > Hello, > > While porting a shell script from Linux to OpenBSD I came across the > following: [cut] > 2) Out of curiosity, is there an OpenBSD equivalent to GNU's '0,/^test$/d' ? As far as I can see, the following would work the

Re: sed(1) and line number 0

2021-08-14 Thread Alexander Hall
One ugly take on these cases is adding an extra line at the beginning of the input. | sed 1p | And then change that 0 to 1. Not pretty but does the job. /Alexander On August 14, 2021 10:46:53 AM GMT+02:00, Philippe Meunier wrote: >Michael Hekeler wrote: >>Your first address is 0? >>What do

Re: using mdnsd as resolver

2021-08-14 Thread Maurice McCarthy
i think it is just an entry in /etc/rc.conf.local like so: pkg_scripts=messagebus mdnsd cupsd The order should be important. Good Luck

using mdnsd as resolver

2021-08-14 Thread Björn Gohla
hi all, i'm trying to use openmdns to find my network printer. it shows up (sporadically) when i run $ mdnsctl browse -r and i can obtain the address using $ mdnsctl lookup EPSON892A3E.local but how do i integrate the mdns daemon into resolv.conf? the man pages certainly don't mention how to d

Re: Determining real-time CPU usage of a process

2021-08-14 Thread Jeremie Courreges-Anglas
On Sat, Aug 14 2021, Baptiste Jonglez wrote: > Hello, Hi Baptiste, long time no see. :) > I would like to determine the CPU usage of a process on a "real-time" > basis. That is, every few seconds (sampling period), I would like to > compute its average CPU usage in the previous period. Looks l

Determining real-time CPU usage of a process

2021-08-14 Thread Baptiste Jonglez
Hello, I would like to determine the CPU usage of a process on a "real-time" basis. That is, every few seconds (sampling period), I would like to compute its average CPU usage in the previous period. If this is too complex, it is also fine to simply compute the average CPU usage over the last fe