03-28-2011
6 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm writing a shell script with bash ver 2.05b in linux. My script has a test with 5 arguments like this:
until
do
.....(some codes)
done
but it raise an error:
[: too many arguments
I tried some ways but not ok.
Could you give a way to work around this. Thanks... (4 Replies)
Discussion started by: baton
4 Replies
2. Shell Programming and Scripting
Hi,
I'm new to scripting and teaching myself how to code. Using Korn, I coded this one return "True" if a file is executable and it's not empty. However, each time I pass a file that is 777 which contains data, the script returns "false".
if
then
echo "true"
else
echo... (2 Replies)
Discussion started by: cruiser
2 Replies
3. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
4. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
5. Shell Programming and Scripting
Hello,
is it possible to give grep two documents to surche for? like
grep "test" /home/one.txt AND /home/two.txt ?
thanks (1 Reply)
Discussion started by: Cybertron
1 Replies
6. Shell Programming and Scripting
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies
NICE(3) BSD Library Functions Manual NICE(3)
NAME
nice -- set program scheduling priority
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
nice(int incr);
DESCRIPTION
This interface is obsoleted by setpriority(2).
The nice() function obtains the scheduling priority of the process from the system and sets it to the priority value specified in incr. The
priority is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling. Only a process
with appropriate privileges may lower priorities.
Children inherit the priority of their parent processes via fork(2).
RETURN VALUES
Upon successful completion, nice() returns the new nice value minus NZERO. Otherwise, -1 is returned, the process' nice value is not
changed, and errno is set to indicate the error.
ERRORS
The nice() function will fail if:
[EPERM] The incr argument is negative and the caller does not have appropriate privileges.
SEE ALSO
nice(1), fork(2), setpriority(2), renice(8)
STANDARDS
The nice() function conforms to X/Open Portability Guide Issue 4, Version 2 (``XPG4.2'').
HISTORY
A nice() syscall appeared in Version 6 AT&T UNIX.
BSD
April 30, 2011 BSD