From nobody Sun May 22 22:21:24 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C4FBC1B44161 for ; Sun, 22 May 2022 22:21:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L5w0h2z0qz4h0j for ; Sun, 22 May 2022 22:21:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45EA523D0F for ; Sun, 22 May 2022 22:21:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 24MMLOjC060644 for ; Sun, 22 May 2022 22:21:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24MMLOKO060643 for bugs@FreeBSD.org; Sun, 22 May 2022 22:21:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264162] /bin/sleep: Add optional units (seconds, minutes, hours, days) Date: Sun, 22 May 2022 22:21:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mallorya@fastmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653258084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5TcsjY+8zn3Cr4flBHqshPwX8pjMa8KAQS1rvhIuy34=; b=NB5JFoR9qt4SU4RzOyKog1JWGx06r3M9Jh8QTALSl6vvQNQlfpM56W6T8kuqqGR5z0sUHE vJYy2U1lg/5OPPmtSI1OdgfGsLbhnrQEhpZKbQYeD7cMUdCZDqmXOCrkndl8Q4meT2y/Pq oTHrCIrjSei2jz+Ff/M03SQlVOqhLhJMmTOLvKRNQ/IvGZOWilDlDIzLhnjxFWfonSN2iw vbqDZWfHWw6DZ4gFZ/kmpm2P9QS62DICROYDs6HLdeSZ5Bh0//hG2f2xwBv3sO2mbOfg7Y 7uhjqeoP/+vVxvjrUDeBzOPsATzNlo1dWX25DmxUVGaSZ10FyfJwhQdAyMNnuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653258084; a=rsa-sha256; cv=none; b=EhKma1ELBKME7opbAX84e/Yn495S8co/SvLhXiyBELjwrQ6LPID5YzST+4qk4xZiYdmKYu p6UjwctbyekZD3mRNPFCy1HRy1+4JrbSggQCKg3kOykB5QwGFXnaGjy/T0vLzfV3buYmON YfFuprawDOlxluvTLXqcDqQdi8Xt7CpDbIUD/GjqsXLoLoFynTwxwSjCNZCXtngHKR6aYU GSer4Ppk+q+tn41RNhAevEUvZxVJ6IY0Lz9w+4sgvrphN3UyO/do95AQF9x7zrxPtEZf6Q d08eO5WxATa8DoE9rnzW0fpSsGuF/FeqFjjFP68R2r/c1hlQI4AfpavVUs5Amg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264162 Bug ID: 264162 Summary: /bin/sleep: Add optional units (seconds, minutes, hours, days) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: mallorya@fastmail.com Created attachment 234127 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234127&action= =3Dedit Allow passing optional units (seconds, minutes, hours, days) to /bin/sleep `sleep` is more convenient when you can pass `5m` instead of `300`. It redu= ces the cognitive load on the user if they don't have to make those conversions themselves. I spent a little while making a patch that mostly works (I'm no C programme= r). There are bugs - you can pass `1sx` and it will parse that as `1s` and igno= re the `x`. If this new feature is acceptable to the FreeBSD project, the implementation would need some cleaning up. I realize this is a feature that's present in GNU sleep. For the record, I = read the GNU sleep man page to see which units it supports but I did not read the source of the program. --=20 You are receiving this mail because: You are the assignee for the bug.=