On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package. There is nothing else in sysvinit-tools that I am missing. -- Per Jessen, Zürich (12.6°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Mon, May 15, 2023 at 11:12 AM Per Jessen <per@opensuse.org> wrote:
On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package.
pidof is provided by procps on Tumbleweed, Leap is explicitly built to exclude pidof from procps. GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 11:12 AM Per Jessen <per@opensuse.org> wrote:
On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package.
pidof is provided by procps on Tumbleweed, Leap is explicitly built to exclude pidof from procps.
Interesting, I wonder why.
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page. I have to say, it would never have occurred to me to even try that. Anyway, thanks, I think it'll be one of those I actually remember! -- Per Jessen, Zürich (13.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
On 2023-05-15 21:42, Dave Howorth wrote:
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
Unclear. It says: "Pause for NUMBER seconds." The "NUMBER need not be an integer." is an afterthought written at the end. The "unlike..." part is not in the manual I get. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
* Carlos E.R. <robin.listas@gmx.es> [05-15-23 16:31]:
On 2023-05-15 21:42, Dave Howorth wrote:
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
Unclear. It says: "Pause for NUMBER seconds."
The "NUMBER need not be an integer." is an afterthought written at the end.
The "unlike..." part is not in the manual I get.
disavowing integer is not mentioned in the man page on my tumbleweed system and attempting to use a non integer provides the statement that "microseconds" are required. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
On Mon, 15 May 2023 18:01:18 -0400, Patrick Shanahan <paka@opensuse.org> wrote:
* Carlos E.R. <robin.listas@gmx.es> [05-15-23 16:31]:
On 2023-05-15 21:42, Dave Howorth wrote:
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <robin.listas@telefonica.net> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
> GNU sleep supports fractional intervals so "usleep 1" == "sleep > 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
Unclear. It says: "Pause for NUMBER seconds."
The "NUMBER need not be an integer." is an afterthought written at the end.
The "unlike..." part is not in the manual I get.
disavowing integer is not mentioned in the man page on my tumbleweed system and attempting to use a non integer provides the statement that "microseconds" are required.
We all must be in different universes. On my openSUSE Tumbleweed 20230514 system, here are two complete sections from man sleep(1): SYNOPSIS sleep NUMBER[SUFFIX]... sleep OPTION DESCRIPTION Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an integer. Given two or more arguments, pause for the amount of time specified by the sum of their values. --help display this help and exit --version output version information and exit [...] And the footer: GNU coreutils 9.3 April 2023 SLEEP(1) Sleep works, and outputs no messages, for either 0.03 or 0.9 as the argument. -- Robert Webb
On 2023-05-16 02:26, Robert Webb via openSUSE Users wrote:
On Mon, 15 May 2023 18:01:18 -0400, Patrick Shanahan <> wrote:
* Carlos E.R. <> [05-15-23 16:31]:
On 2023-05-15 21:42, Dave Howorth wrote:
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <> wrote: >> GNU sleep supports fractional intervals so "usleep 1" == "sleep >> 0.000001". > > Heh, it does indeed! Pity it doesn't accept the suffixes ms and > us too. I guess the fractions work mostly by coincidence? There > is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
Unclear. It says: "Pause for NUMBER seconds."
The "NUMBER need not be an integer." is an afterthought written at the end.
The "unlike..." part is not in the manual I get.
disavowing integer is not mentioned in the man page on my tumbleweed system and attempting to use a non integer provides the statement that "microseconds" are required.
We all must be in different universes. On my openSUSE Tumbleweed
But the OP is using Leap 15.5. It says: DESCRIPTION Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an integer. Given two or more arguments, pause for the amount of time specified by the sum of their values. ... GNU coreutils 8.32 October 2021 SLEEP(1) And if I ask for "man 1p sleep", it says: DESCRIPTION The sleep utility shall suspend execution for at least the integral number of seconds specified by the time operand. ... IEEE/The Open Group 2013 SLEEP(1P) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [05-15-23 22:46]:
On 2023-05-16 02:26, Robert Webb via openSUSE Users wrote:
On Mon, 15 May 2023 18:01:18 -0400, Patrick Shanahan <> wrote:
* Carlos E.R. <> [05-15-23 16:31]:
On 2023-05-15 21:42, Dave Howorth wrote:
On Mon, 15 May 2023 11:45:10 +0200 "Carlos E. R." <> wrote:
On 2023-05-15 11:36, Andrei Borzenkov wrote: > On Mon, May 15, 2023 at 12:23 PM Per Jessen <> wrote: > > > GNU sleep supports fractional intervals so "usleep 1" == "sleep > > > 0.000001". > > > > Heh, it does indeed! Pity it doesn't accept the suffixes ms and > > us too. I guess the fractions work mostly by coincidence? There > > is no mention in the man page. > > Code to parse floating point numbers can hardly appear by > coincidence and it is documented in the info page (which is the > primary documentation for GNU software). I agree that additional > suffixes would be useful.
That the man page doesn't mention this (rather suggest integer seconds), is a bug, IMHO.
The man page says "NUMBER need not be an integer" or "Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number" so no suggestion of integers.
Unclear. It says: "Pause for NUMBER seconds."
The "NUMBER need not be an integer." is an afterthought written at the end.
The "unlike..." part is not in the manual I get.
disavowing integer is not mentioned in the man page on my tumbleweed system and attempting to use a non integer provides the statement that "microseconds" are required.
We all must be in different universes. On my openSUSE Tumbleweed
But the OP is using Leap 15.5.
It says:
DESCRIPTION Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an integer. Given two or more arguments, pause for the amount of time specified by the sum of their values. ...
GNU coreutils 8.32 October 2021 SLEEP(1)
And if I ask for "man 1p sleep", it says:
DESCRIPTION The sleep utility shall suspend execution for at least the integral number of seconds specified by the time operand.
... IEEE/The Open Group 2013 SLEEP(1P)
the *original* question was about "usleep", not sleep. one would expect different discriptions and parameters. sleep in contained in coreutils. indeed! -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
On 5/16/23 04:45, Carlos E. R. wrote:
And if I ask for "man 1p sleep", it says: ________________________^^
sure, that's what POSIX specifies about the sleep utility; here's the original spec: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sleep.html Actual implementations like that in the GNU coreutils may vary, and add extensions. GNU sleep allows sub-seconds. To be read in 'man 1 sleep', or better in the manual: Full documentation <https://www.gnu.org/software/coreutils/sleep> or available locally via: info '(coreutils) sleep invocation' Have a nice day, Berny
Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Code to parse floating point numbers can hardly appear by coincidence
True, that is unlikely.
and it is documented in the info page (which is the primary documentation for GNU software). I agree that additional suffixes would be useful.
I guess it is relatively new - on my 15.3 system, the info page and the info pages are the same, dated 2001 - of course, it isn't GNU usleep, it is SUSE usleep :-) As for info pages - I have been able to "migrate" to those. -- Per Jessen, Zürich (12.4°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Per Jessen wrote:
As for info pages - I have been able to "migrate" to those.
I hate it when I manage to omit the most important word and the whole sentence changes meaning. Put in a "never", I'm sure you'll figure out where it belongs. -- Per Jessen, Zürich (12.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-05-15 12:07, Per Jessen wrote:
Per Jessen wrote:
As for info pages - I have been able to "migrate" to those.
I hate it when I manage to omit the most important word and the whole sentence changes meaning. Put in a "never", I'm sure you'll figure out where it belongs.
Try "pinfo". Will load the info pages if they exist, otherwise, revert to to man pages. And the interface is easier - except if you are a vi fan :-P -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos, et al -- ...and then Carlos E. R. said... % ... % % And the interface is easier - except if you are a vi fan :-P +1 ... million or so :-) % % -- % Cheers / Saludos, % % Carlos E. R. % (from 15.4 x86_64 at Telcontar) % HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Mon, 15 May 2023 12:32:18 +0200 On 2023-05-15 12:07, Per Jessen wrote:
Per Jessen wrote:
As for info pages - I have been able to "migrate" to those.
I hate it when I manage to omit the most important word and the whole sentence changes meaning. Put in a "never", I'm sure you'll figure out where it belongs.
Try "pinfo". Will load the info pages if they exist, otherwise, revert to to man pages. And the interface is easier - except if you are a vi fan :-P -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar) Or "C-h i" in emacs. Just for completeness. ;-} -- Bob Rogers http://www.rgrjr.com/
I do Linux class for people, and I teach man and info, I like info because of the color that shows up. Side issue, I wish people stop using nano, vim is great. Anway, old cracky geek here. Thanks for the info on pinfo. On Mon, May 15, 2023 at 1:18 PM Bob Rogers <rogers@rgrjr.com> wrote:
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Mon, 15 May 2023 12:32:18 +0200
On 2023-05-15 12:07, Per Jessen wrote:
Per Jessen wrote:
As for info pages - I have been able to "migrate" to those.
I hate it when I manage to omit the most important word and the whole sentence changes meaning. Put in a "never", I'm sure you'll figure out where it belongs.
Try "pinfo". Will load the info pages if they exist, otherwise, revert to to man pages.
And the interface is easier - except if you are a vi fan :-P
-- Cheers / Saludos,
Carlos E. R. (from 15.4 x86_64 at Telcontar)
Or "C-h i" in emacs. Just for completeness. ;-}
-- Bob Rogers http://www.rgrjr.com/
-- Terror PUP a.k.a Chuck "PUP" Payne ----------------------------------------- Discover it! Enjoy it! Share it! openSUSE Linux. ----------------------------------------- openSUSE -- Terrorpup openSUSE Ambassador/openSUSE Member skype,twiiter,identica,friendfeed -- terrorpup freenode(irc) --terrorpup/lupinstein Register Linux Userid: 155363 openSUSE Community Member since 2008.
On 2023-05-15 19:47, Chuck Payne wrote:
I do Linux class for people, and I teach man and info, I like info because of the color that shows up.
Side issue, I wish people stop using nano, vim is great. Anway, old cracky geek here.
Thanks for the info on pinfo.
pinfo has colour for some things in man pages. For example, references to other man pages show in green, meaning that you can jump to them (a link). The selected one shows in orange, and pressing [Enter] will go to that page. Mail addresses show violet, and hitting them opens "mail". Try "pinfo pinfo" :-) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Per, et al -- ...and then Per Jessen said... % Per Jessen wrote: % % > As for info pages - I have been able to "migrate" to those. % % I hate it when I manage to omit the most important word and the whole *grin* % sentence changes meaning. Put in a "never", I'm sure you'll figure out % where it belongs. +1 *sigh* % % -- % Per Jessen, Zürich (12.9°C) % Member, openSUSE Heroes (2016 - present) % We're hiring - https://en.opensuse.org/openSUSE:Heroes HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt
On Mon, 15 May 2023 12:36:20 +0300, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Mon, May 15, 2023 at 12:23 PM Per Jessen <per@opensuse.org> wrote:
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too.
[...] I agree that additional suffixes would be useful.
Surprise! Instead of "ms" and "us", use "e-3" and "e-6". [1] So if you want to use integers to specify sub-second values, you're in luck. But, you can also use full exponential notation and follow it with an optional s|m|h|d suffix (for seconds|minutes|hours|days): sleep 567.89e-6h (for 2.044404 seconds) Now I've noticed that "info '(coreutils) sleep invocation'" also describes the exponential notation form. [1] https://www.gnu.org/software/coreutils/manual/coreutils.html#sleep-invocatio... -- Robert Webb
On 2023-05-15 11:23, Per Jessen wrote:
Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 11:12 AM Per Jessen <per@opensuse.org> wrote:
On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package.
pidof is provided by procps on Tumbleweed, Leap is explicitly built to exclude pidof from procps.
Interesting, I wonder why.
Maybe because sysvinit-tools had it. It would be a bug, now procps should have it now.
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
Can it be a bash internal? Mmm, no, not listed in man bashbuiltins.
I have to say, it would never have occurred to me to even try that. Anyway, thanks, I think it'll be one of those I actually remember!
I think I noticed it recently. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-05-15 11:23, Per Jessen wrote:
Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 11:12 AM Per Jessen <per@opensuse.org> wrote:
On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package.
pidof is provided by procps on Tumbleweed, Leap is explicitly built to exclude pidof from procps.
Interesting, I wonder why.
Maybe because sysvinit-tools had it.
You could ask why it wasn't excluded from sysvinit-tools instead which just by name is way deprecated. procps has a few key utilities - top, watch and sysctl, for instance. Anyway, it's probably some SLES compatibility thing. -- Per Jessen, Zürich (12.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Mon, 15 May 2023 11:23:22 +0200 Per Jessen <per@opensuse.org> wrote:
Andrei Borzenkov wrote:
On Mon, May 15, 2023 at 11:12 AM Per Jessen <per@opensuse.org> wrote:
On my leap155 box, I don't have any 'pidof'. It seems to be part of sysvinit-tools. Looking at the contents of that, at least pidof and usleep seem to be quite useful - I wonder if they ought to be moved to some other package.
pidof is provided by procps on Tumbleweed, Leap is explicitly built to exclude pidof from procps.
Interesting, I wonder why.
google suggests pgrep works more reliably (pidof omits processes blocked on disk I/O)
GNU sleep supports fractional intervals so "usleep 1" == "sleep 0.000001".
Heh, it does indeed! Pity it doesn't accept the suffixes ms and us too. I guess the fractions work mostly by coincidence? There is no mention in the man page.
I have to say, it would never have occurred to me to even try that. Anyway, thanks, I think it'll be one of those I actually remember!
participants (11)
-
Andrei Borzenkov
-
Bernhard Voelker
-
Bob Rogers
-
Carlos E. R.
-
Carlos E.R.
-
Chuck Payne
-
Dave Howorth
-
David T-G
-
Patrick Shanahan
-
Per Jessen
-
Robert Webb