So in bash, in order to get a higher priority, you need to add an extra '-'. That is interesting and will come in handy, as I usually use bash. Looking at the man page in either csh or bash does not make this clear at all. Thanks for breaking it down for me. -Mike
On 1/15/07, Rob Sherwood <[EMAIL PROTECTED]> wrote:
On Sun, Jan 14, 2007 at 11:48:42PM -0500, Michael Hughes wrote: > So if I'm understanding you corectly, the syntax I'm looking for is: > csh> sudo -u $USER nice -15 [scriptname] >& logfile.log & Yes. > I am a bit confused on your other point - I read the man page and it > states that minus values increase priority such that -20 is highest > priority and (+)20 is the lowest. My point is that there are two command line syntaxes for nice, because there are two different versions of nice. When you are in csh and type `which nice`, you get: [EMAIL PROTECTED]:~> which nice nice: shell built-in command. [EMAIL PROTECTED]:~> nice -19 hostname setpriority: Permission denied. [EMAIL PROTECTED]:~> nice +19 hostname nor.localdomain but when you use bash, you get a different nice with different syntax. [EMAIL PROTECTED]:~> exec bash [EMAIL PROTECTED] ~]$ which nice /bin/nice [EMAIL PROTECTED] ~]$ nice -19 hostname nor.localdomain [EMAIL PROTECTED] ~]$ nice --19 hostname nice: cannot set priority: Permission denied I am used to the latter nice implemention with the latter syntax, and I think it is the more common. I was just noting the difference for anyone who might care (probably no one). Didn't mean to cause any confusion. - Rob .
