nice: Badly formed number

Sascha Wildner saw at online.de
Wed Dec 7 02:18:27 PST 2011


On Tue, 06 Dec 2011 22:16:08 +0100, william opensource4you  
<william.os4y at 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 at 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





More information about the Users mailing list