10-26-2010
10 More Discussions You Might Find Interesting
1. AIX
I have this Korn script that I wrote (with some help) that is run by cron. I basically watches a file system for a specific filename to be uploaded (via FTP), checks to make sure that the file is no longer being uploaded (by checking the files size), then runs a series of other scripts. The... (2 Replies)
Discussion started by: heprox
2 Replies
2. Shell Programming and Scripting
I need to remove the '&' from a file.
In each line of the file, the fields are separated by ^K.
I only want to remove '&' if it exists in field number 9. (example of field 9: abc&xyz)
I need to do an in place/in line edit.
So far I have accomplished the following:
awk -F '^K' '{print... (6 Replies)
Discussion started by: hemangjani
6 Replies
3. Shell Programming and Scripting
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies
4. Shell Programming and Scripting
Dear all,
I have a file which have let us say records from A-Z.
Now I want to remove multiple letter from this file using single command.. let us say I want to remove A,F,K,Y,U,P,B,S,D.
I can use grep -v command but for this case i need to rerun the file several time i wana avoid using... (3 Replies)
Discussion started by: jojo123
3 Replies
5. Shell Programming and Scripting
I need to replace (delete) a text block in a bunch of files, its a html table, almost at the end of pages but the location varies.
In Windows I used Filemonkey, but nothing like that in Unix?
There is replace from mysql, but how does it deal with newlines?
sed only works with single lines,... (6 Replies)
Discussion started by: eiland
6 Replies
6. Shell Programming and Scripting
Hi,
I lack the utter fundamentals on how to craft an awk script.
I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies
7. Shell Programming and Scripting
Hello all,
I have a text files that consists of blocks of text. Each block of text represents a set of Cartesian coordinates for a molecule. Each block of text starts with a line that has a only a number, which is equal to the total number of atoms in the molecule. After this number is a line... (15 Replies)
Discussion started by: marcozd
15 Replies
8. Shell Programming and Scripting
Hello,
Although I have found similar questions, I could not find advice that
could help with our problem.
The issue:
We have several hundreds text files containing repeated blocks of text
(I guess back at the time they were prepared like that to optmize
printing).
The block of texts... (13 Replies)
Discussion started by: samask
13 Replies
9. Shell Programming and Scripting
Hi,
I have file with all the lines as following format
<namebindings:StringNameSpaceBinding xmi:id="StringNameSpaceBinding" name="ENV_CONFIG_PATH" nameInNameSpace="COMP/HOD/MYSTR/BACKOFFICE/ENV_CONFIG_PATH" stringToBind="test"/>
I want to replace (all the lines) value of... (8 Replies)
Discussion started by: shuklaa02
8 Replies
10. Shell Programming and Scripting
Hi
I have a text file named main.txt with 10,000 lines. I have another file with a list of line numbers (around 1000) of the lines to be deleted from main.txt file.
I tried with sed but it removes only a range of line numbers.
Thanks for any help!! (1 Reply)
Discussion started by: prvnrk
1 Replies
NICE(P) POSIX Programmer's Manual NICE(P)
NAME
nice - change the nice value of a process
SYNOPSIS
#include <unistd.h>
int nice(int incr);
DESCRIPTION
The nice() function shall add the value of incr to the nice value of the calling process. A process' nice value is a non-negative number
for which a more positive value shall result in less favorable scheduling.
A maximum nice value of 2*{NZERO}-1 and a minimum nice value of 0 shall be imposed by the system. Requests for values above or below these
limits shall result in the nice value being set to the corresponding limit. Only a process with appropriate privileges can lower the nice
value.
Calling the nice() function has no effect on the priority of processes or threads with policy SCHED_FIFO or SCHED_RR. The effect on pro-
cesses or threads with other scheduling policies is implementation-defined.
The nice value set with nice() shall be applied to the process. If the process is multi-threaded, the nice value shall affect all system
scope threads in the process.
As -1 is a permissible return value in a successful situation, an application wishing to check for error situations should set errno to 0,
then call nice(), and if it returns -1, check to see whether errno is non-zero.
RETURN VALUE
Upon successful completion, nice() shall return the new nice value -{NZERO}. Otherwise, -1 shall be returned, the process' nice value shall
not be changed, and errno shall be set to indicate the error.
ERRORS
The nice() function shall fail if:
EPERM The incr argument is negative and the calling process does not have appropriate privileges.
The following sections are informative.
EXAMPLES
Changing the Nice Value
The following example adds the value of the incr argument, -20, to the nice value of the calling process.
#include <unistd.h>
...
int incr = -20;
int ret;
ret = nice(incr);
APPLICATION USAGE
None.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
getpriority() , setpriority() , the Base Definitions volume of IEEE Std 1003.1-2001, <limits.h>, <unistd.h>
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE
and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained
online at http://www.opengroup.org/unix/online.html .
IEEE
/The Open Group 2003 NICE(P)