06-10-2010
wops, it should be "for"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've been trying all night to come up with a script that will take a file that contains job completion times like this as input:
18:30
17:45
16:39
18:01
17:50
...
and figure the Average completion time. I've tried several things, and I just can't seem to get it to figure correctly. I'm... (5 Replies)
Discussion started by: Seawall
5 Replies
2. Shell Programming and Scripting
Hi,
I'm, new to shell scripting, I have a requirement where I have to split an incoming file into separate files each containing a maximum of 3 million rows.
For e.g: if my incoming file say In.txt has 8 mn rows then I need to create 3 files, in which two will 3 mn rows and one will contain 2... (2 Replies)
Discussion started by: wahi80
2 Replies
3. UNIX for Dummies Questions & Answers
Hi All
I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file.
eg.
29
33
48
30
28 (6 Replies)
Discussion started by: pk_eee
6 Replies
4. Shell Programming and Scripting
Hi friends
I have 100 files in my directory. Each file look like this..
Temp1 Temp2 Temp3
MAS 1 2 3
MAS 4 5 6
MAS 7 8 9
Delhi 10 11 12
Delhi 13 14 15
Delhi 16 17 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
5. Shell Programming and Scripting
Hi Friends,
In continuation to my earlier post
https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html
I am extending my problem as follows.
Input:
Column1 Column2
MAS 1
MAS 4 ... (2 Replies)
Discussion started by: ks_reddy
2 Replies
6. UNIX for Dummies Questions & Answers
Could anybody help with this?
I have input below .....
david,39
david,39
emelie,40
clarissa,22
bob,42
bob,42
tim,32
bob,39
david,38
emelie,47
what i want to do is count how many names there are with different ages, so output would be like this ....
david,2
emelie,2
clarissa,1... (3 Replies)
Discussion started by: itsme999
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file like this one
h1 4.70650E-04 4.70650E-04 4.70650E-04
h2 1.92912E-04 1.92912E-04 1.92912E-04
h3A 3.10160E-11 2.94562E-11 2.78458E-11
h4 0.00000E+00 0.00000E+00 0.00000E+00
h1 1.18164E-12 2.74150E-12 4.35187E-12
h1 7.60813E-01 7.60813E-01 7.60813E-01... (5 Replies)
Discussion started by: f_o_555
5 Replies
8. Shell Programming and Scripting
Hi
I have a requirement, where i will receive multiple files in a folder (say: /fol1/fol2/). There will be at least 14 to 16 files. The size of the files will different, some may be 80GB or 90GB, some may be less than 5 GB (and the size of the files are very unpredictable). But the names of the... (10 Replies)
Discussion started by: kpk_ds
10 Replies
9. Shell Programming and Scripting
I have no idea how to even get started with this script.
I need to average field 3 for each of the unique identifiers found in field 1. However, I only want to average these rows when field 2 is equal to 1506 - 2000 (note that i replaced the values field 2 for security reasons, but the real... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
10. UNIX for Beginners Questions & Answers
i have a file with 2 columns. i want to calculate the average of column 1 based on the values of column 2. here's how the file looks like. i want to calculate the sums of numbers corresponding to 1 and then calculate the average. same for numbers corresponding to zero. any help with a code would... (1 Reply)
Discussion started by: onerokeyz
1 Replies
LEARN ABOUT CENTOS
sigorset
SIGSETOPS(3) Linux Programmer's Manual SIGSETOPS(3)
NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - POSIX signal set operations.
SYNOPSIS
#include <signal.h>
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember():
_POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
DESCRIPTION
These functions allow the manipulation of POSIX signal sets.
sigemptyset() initializes the signal set given by set to empty, with all signals excluded from the set.
sigfillset() initializes set to full, including all signals.
sigaddset() and sigdelset() add and delete respectively signal signum from set.
sigismember() tests whether signum is a member of set.
Objects of type sigset_t must be initialized by a call to either sigemptyset() or sigfillset() before being passed to the functions
sigaddset(), sigdelset() and sigismember() or the additional glibc functions described below (sigisemptyset(), sigandset(), and sig-
orset()). The results are undefined if this is not done.
RETURN VALUE
sigemptyset(), sigfillset(), sigaddset(), and sigdelset() return 0 on success and -1 on error.
sigismember() returns 1 if signum is a member of set, 0 if signum is not a member, and -1 on error. On error, these functions set errno to
indicate the cause.
ERRORS
EINVAL sig is not a valid signal.
CONFORMING TO
POSIX.1-2001.
NOTES
Glibc notes
If the _GNU_SOURCE feature test macro is defined, then <signal.h> exposes three other functions for manipulating signal sets.
int sigisemptyset(sigset_t *set);
returns 1 if set contains no signals, and 0 otherwise.
int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right);
places the union of the sets left and right in dest.
int sigandset(sigset_t *dest, sigset_t *left, sigset_t *right);
places the intersection of the sets left and right in dest.
sigorset() and sigandset() return 0 on success, and -1 on failure.
These functions are nonstandard (a few other systems provide similar functions) and their use should be avoided in portable applications.
SEE ALSO
sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2013-04-19 SIGSETOPS(3)