DragonFly BSD
DragonFly users List (threaded) for 2011-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: nice: Badly formed number


From: "Sascha Wildner" <saw@xxxxxxxxx>
Date: Wed, 07 Dec 2011 11:18:27 +0100

On Tue, 06 Dec 2011 22:16:08 +0100, william opensource4you <william.os4y@gmail.com> wrote:

Hi all,


Am I the only one having troubles with the command nice ? I'm running: DragonFly mydfbsd 2.10-RELEASE DragonFly v2.10.1.1.gf7ba0-RELEASE #1: Mon Apr 25 19:51:42 UTC 2011 root@pkgbox32.dragonflybsd.org:/usr/obj/usr/src/sys/GENERIC_SMP i386


Here the results (the last example is coming from the man page): mydfbsd# nice -5 date Tue Dec 6 22:11:19 CET 2011 mydfbsd# nice -n5 date nice: Badly formed number. mydfbsd# nice -n 5 date nice: Badly formed number.

If I take the source code on the gitweb:
http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/usr.bin/nice/nice.c
I compile it by doing "gcc nice.c"

here the results:

mydfbsd# ./a.out -5 date
Tue Dec  6 22:11:08 CET 2011
mydfbsd# ./a.out -n5 date
Tue Dec  6 22:11:11 CET 2011
mydfbsd# ./a.out -n 5 date
Tue Dec  6 22:11:14 CET 2011

Why 2 different results ?
It does not sounds that nice has been updated since them ...

Nice is a builtin in csh(1) (which I guess you are using in the first example) and has a different syntax there (see documentation in csh(1) manpage for 'nice'). In the second example you use the non-builtin (which also sh(1) will use).


Sascha



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]