misc/55411: One of the freebsd-tips in fortune(1) is incorrect on time(1) command.

Grzegorz Czaplinski G.Czaplinski at prioris.mini.pw.edu.pl
Wed Aug 13 13:47:18 PDT 2003


On Wed, Aug 13, 2003 at 01:29:53PM -0700, Ceri Davies wrote:
> Synopsis: One of the freebsd-tips in fortune(1) is incorrect on time(1) command.
> 
> State-Changed-From-To: open->closed
> State-Changed-By: ceri
> State-Changed-When: Wed Aug 13 13:28:53 PDT 2003
> State-Changed-Why: 
> The fortune is fine.
> If it mentioned the -h switch then I'd agree, but it doesn't.
> 
> 
> Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs
> Responsible-Changed-By: ceri
> Responsible-Changed-When: Wed Aug 13 13:28:53 PDT 2003
> Responsible-Changed-Why: 
> Not a ports bug.
> 

Hi there,

STOP!

I see you don't get the whole point. This is not the only one error in
fortune tips given by Dru*.

Consider that:
1.
alphax# time ping -c prioris.mini.pw.edu.pl
ping: invalid count of packets to transmit: `prioris.mini.pw.edu.pl'
0.000u 0.004s 0:00.04 0.0%      0+0k 1+0io 6pf+0w
alphax# time ping -c 2 prioris.mini.pw.edu.pl
PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes
64 bytes from 194.29.178.2: icmp_seq=0 ttl=68 time=0.874 ms
64 bytes from 194.29.178.2: icmp_seq=1 ttl=68 time=0.602 ms

--- prioris.mini.pw.edu.pl ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.602/0.738/0.874/0.136 ms
0.000u 0.008s 0:01.06 0.0%      0+0k 0+0io 4pf+0w

2.
alphax# \time ping -c 2 prioris.mini.pw.edu.pl
PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes
64 bytes from 194.29.178.2: icmp_seq=0 ttl=68 time=0.675 ms
64 bytes from 194.29.178.2: icmp_seq=1 ttl=68 time=0.630 ms

--- prioris.mini.pw.edu.pl ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.630/0.653/0.675/0.022 ms
        1.02 real         0.00 user         0.00 sys

3.
alphax# \time -h ping -c 2 prioris.mini.pw.edu.pl
PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes
64 bytes from 194.29.178.2: icmp_seq=0 ttl=68 time=0.683 ms
64 bytes from 194.29.178.2: icmp_seq=1 ttl=68 time=0.507 ms

--- prioris.mini.pw.edu.pl ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.507/0.595/0.683/0.088 ms
        1.01s real              0.00s user              0.00s sys

These examples are from:
alphax# uname -a
FreeBSD alphax.mini.pw.edu.pl 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Mon
Jun 16 20:46:55 CEST 2003     root at alphax.mini.pw.edu.pl:/usr/obj/usr/src/sys/

The shell is csh. From zsh it looks much different:

alphax# time ping -c 2 prioris.mini.pw.edu.pl
PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes
64 bytes from 194.29.178.2: icmp_seq=0 ttl=68 time=0.666 ms
64 bytes from 194.29.178.2: icmp_seq=1 ttl=68 time=0.642 ms

--- prioris.mini.pw.edu.pl ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.642/0.654/0.666/0.012 ms
ping -c 2 prioris.mini.pw.edu.pl  0.00s user 0.01s system 0% cpu 1.012
total

If someone has csh as his/her default shell the output is totally
unreadable. This is because you call shells builtin. Prefixing time
command with a "\" you prevent such errors as then you call time(1).

I guess you did not perform any tests before closing the PR.

Have a good one,
	greg
--
Grzegorz Czaplinski <gregory at prioris.mini.pw.edu.pl>
"The Power to Serve, Right for the Power Users!" - http://www.FreeBSD.org/
 Fingerprint: EB77 E19D CFA2 5736 810F  847C A70F A275 2489 469F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20030813/21c4c1c8/attachment.bin


More information about the freebsd-bugs mailing list