DragonFly users List (threaded) for 2011-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: nice: Badly formed number
Thanks Freddie,
This is indeed the problem.
I've not make attention that the shell is Tcsh and nice is part of it
(like for csh).
On Tue, Dec 6, 2011 at 10:36 PM, Freddie Cash <fjwcash@gmail.com> wrote:
> On Tue, Dec 6, 2011 at 1:16 PM, william opensource4you
> <william.os4y@gmail.com> wrote:
>>
>> 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.
>
>
> nice is both a binary (/usr/bin/nice) and a shell built-in function.
> Depending on the shell you are using, you will either be using the built-in
> or the binary. And the syntax for them is very different.
>
> I believe you are using the csh above, thus using the built-in nice, which
> does not support -n.
>
>>
>> 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
>
>
> Here you are giving the full path to the nice binary, so you are always
> using that binary.
>
> Try the above using /usr/bin/nice for each test, and you'll get the same
> results.
>
> Read the man page for your shell to see if nice is a built-in function or
> not.
>
> --
> Freddie Cash
> fjwcash@gmail.com
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]