Sponsored Content
The Lounge What is on Your Mind? Which category do you belong to? Post 303009267 by galapagos8000 on Monday 11th of December 2017 04:36:37 PM
Old 12-11-2017
trying to learn. this forum is too advanced haha
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

listing files that do not belong to current date

How do we list all the file names in a directory that does not belong to current date. (1 Reply)
Discussion started by: esh.mohan
1 Replies

2. UNIX for Dummies Questions & Answers

listing files that does not belong to current date

How do we list all the file names in a directory that does not belong to current date. (3 Replies)
Discussion started by: esh.mohan
3 Replies

3. Post Here to Contact Site Administrators and Moderators

How to change the category?

Hi, I submitted my blog on UNIX in the links section. On submitting, i chose the category as Unix/Linux standards, which i now feel is incorrect. I would like to change the category of my link, but i don't find any option to change the category. Please help me in doing the needful. Thanks... (7 Replies)
Discussion started by: guruprasadpr
7 Replies

4. Shell Programming and Scripting

Split file into given category and others using awk

Hi All, Would it be possible using awk to split a given file into two files based on a certain condition such that one output file will contain all lines that fit the condition while the other output file will contain lines that did not fit the condition? Here is a sample input file ... (6 Replies)
Discussion started by: cympaulife
6 Replies

5. Shell Programming and Scripting

Listing files that belong to a certain year date?

I'm trying to list files, first by size and I'm using something like this ls -l|awk '{print $5,$6,$7,$8,$9|"sort -nr"}'|more Now I'd like to just do the same listing but only for files with the year 2009 in the $8 field or even anything less than 2011. (5 Replies)
Discussion started by: NycUnxer
5 Replies

6. Shell Programming and Scripting

extract the max value category

Hi, I have a file and I want the category for each row to be its highest value. gene highest medium lower lowest ABC 20 30 50 70 DEF 90 20 60 0 o/p gene highest medium lower lowest category ABC... (6 Replies)
Discussion started by: Diya123
6 Replies

7. UNIX for Dummies Questions & Answers

ldap , search groups that user belong

i want run query to identify witch groups that user A belong, CN=name,CN=Users,DC=mydomain ?? (1 Reply)
Discussion started by: prpkrk
1 Replies

8. Shell Programming and Scripting

Data filtering and category assigning

Please consider the following file, I have many groups which can be of 3 types, T1 (Serial_Number 1) T2 (Serial_Number 2) and T1*T2 (all other Serial_Number). I want to only consider groups that have both T1 and T2 present and their values are different from each other. In the example file,... (8 Replies)
Discussion started by: jianp83
8 Replies

9. Shell Programming and Scripting

Category and count with awk

I want to categorize and count the as below: Input file: A1 G1 C1 F1 A2 G1 C1 F1 A3 G1 C1 F2 A4 G1 C2 F2 A7 G1 C2 F2 A8 G1 C2 F3 A11 G1 C2 F3 A23 G1 C2 F3 B4 G1 C2 F3 AC4 G2 C3 F4 B6 G2 C4 F4 BB5 G2 C4 F4 A25 G2 C5 F4 B13 G2 C5 F5 D12 G2 C5 F5 D2 G2 C5 F5 (3 Replies)
Discussion started by: aydj
3 Replies

10. UNIX for Beginners Questions & Answers

Delete records that do not belong to that day

i have a requirement to delete records that do not belong to that day. For example in a file that came on July 31st ,2018 there are records that belong to Aug 1st,2018 as well and I want to find and delete those records. I want to delete anything with 01-Aug-2018. I have several files like that. I... (6 Replies)
Discussion started by: Priya
6 Replies
POLL(2) 						     Linux Programmer's Manual							   POLL(2)

NAME
poll - wait for some event on a file descriptor SYNOPSIS
#include <sys/poll.h> int poll(struct pollfd *ufds, unsigned int nfds, int timeout); DESCRIPTION
poll is a variation on the theme of select. It specifies an array of nfds structures of type struct pollfd { int fd; /* file descriptor */ short events; /* requested events */ short revents; /* returned events */ }; and a timeout in milliseconds. A negative value means infinite timeout. The field fd contains a file descriptor for an open file. The field events is an input parameter, a bitmask specifying the events the application is interested in. The field revents is an output parameter, filled by the kernel with the events that actually occurred, either of the type requested, or of one of the types POLLERR or POLLHUP or POLLNVAL. (These three bits are meaningless in the events field, and will be set in the revents field whenever the correspond- ing condition is true.) If none of the events requested (and no error) has occurred for any of the file descriptors, the kernel waits for timeout milliseconds for one of these events to occur. The following possible bits in these masks are defined in <sys/poll.h> #define POLLIN 0x0001 /* There is data to read */ #define POLLPRI 0x0002 /* There is urgent data to read */ #define POLLOUT 0x0004 /* Writing now will not block */ #define POLLERR 0x0008 /* Error condition */ #define POLLHUP 0x0010 /* Hung up */ #define POLLNVAL 0x0020 /* Invalid request: fd not open */ In <asm/poll.h> also the values POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND and POLLMSG are defined. RETURN VALUE
On success, a positive number is returned, where the number returned is the number of structures which have non-zero revents fields (in other words, those descriptors with events or errors reported). A value of 0 indicates that the call timed out and no file descriptors have been selected. On error, -1 is returned, and errno is set appropriately. ERRORS
EBADF An invalid file descriptor was given in one of the sets. ENOMEM There was no space to allocate file descriptor tables. EFAULT The array given as argument was not contained in the calling program's address space. EINTR A signal occurred before any requested event. CONFORMING TO
XPG4-UNIX. AVAILABILITY
The poll() systemcall was introduced in Linux 2.1.23. The poll() library call was introduced in libc 5.4.28 (and provides emulation using select if your kernel does not have a poll syscall). SEE ALSO
select(2), select_tut(2) Linux 2.1.23 1997-12-07 POLL(2)
All times are GMT -4. The time now is 05:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy