9 More Discussions You Might Find Interesting
1. What is on Your Mind?
In the past few days have I have done a lot of code cleanup work in various categories, including faster page loading and bug fixes:
Move countless inline style directives to external CSS stylesheets for key pages (faster page loading)
Fixed bug in member panel going between desktop and... (6 Replies)
Discussion started by: Neo
6 Replies
2. Shell Programming and Scripting
there are about 300 objectivec .m files and I need to print each file name and its method and number of lines inside the method
there is a sample perl files that do perl brace matching... (0 Replies)
Discussion started by: steve32001
0 Replies
3. UNIX for Dummies Questions & Answers
Hi guys and gals...
Someone pointed me to this URL this morning and thought I might be interested.
Not the best bash solution but at my level I solved it this way, in around 5-10 minutes...
What about your attempts...
Produce the number 2014 without any numbers in your source code -... (40 Replies)
Discussion started by: wisecracker
40 Replies
4. Shell Programming and Scripting
i have a file with some number of colums and each row have different number of fields.
now my target is supposed to be, each row should have same number of columns.
example:
src file:
111,S3mobile,Samsu
ng
112,Lu
mia,Nok
ia
113,brav
ia,Sonyerichson
tgt file:
111,S3mobile,Samsung... (8 Replies)
Discussion started by: abhilash_nakka
8 Replies
5. Shell Programming and Scripting
Hello experts,
Shown below is the 2 column sample data(there are many data columns in actual input file),
Key, Data
A, 1
A, 2
A, 2
A, 3
A, 1
A, 1
A, 1
I need the below output.
Key, Data
A, 2
A, 2
A, 3
A, 1
A, 1
A, 1 (2 Replies)
Discussion started by: ks_reddy
2 Replies
6. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
7. Programming
i used a two-way linked list "node" for the code::
#include<stdio.h>
#include<malloc.h>
void insert();
void reverse();
struct node
{
char c;
struct node *next;
struct node *back;
}*start=NULL;
int main()
{
int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies
8. Shell Programming and Scripting
How would one go about finding the greatest number in an array of numbers using loops and if statements? For example, if you had an array like this:
(4, 8, 3, 19, 6, 11) (3 Replies)
Discussion started by: DemonixX
3 Replies
9. Shell Programming and Scripting
I'm trying to write a script that identifies whether a directory of the form AWL.????????.IP exists. I have one that exists which is AWL.05301032.IP.
When I test like this: If ]
I get true, but when I test like this:
If ]
Or like this
If ]
Or any other variation of wild cards, I... (4 Replies)
Discussion started by: philplasma
4 Replies
SIGBLOCK(3) BSD Library Functions Manual SIGBLOCK(3)
NAME
sigblock -- block signals
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <signal.h>
int
sigblock(int mask);
int
sigmask(signum);
DESCRIPTION
This interface is made obsolete by: sigprocmask(2).
sigblock() adds the signals specified in mask to the set of signals currently being blocked from delivery. Signals are blocked if the corre-
sponding bit in mask is a 1; the macro sigmask() is provided to construct the mask for a given signum.
It is not possible to block SIGKILL or SIGSTOP; this restriction is silently imposed by the system.
RETURN VALUES
The previous set of masked signals is returned.
EXAMPLES
The following example using sigblock():
int omask;
omask = sigblock(sigmask(SIGINT) | sigmask(SIGHUP));
Becomes:
sigset_t set, oset;
sigemptyset(&set);
sigaddset(&set, SIGINT);
sigaddset(&set, SIGHUP);
sigprocmask(SIG_BLOCK, &set, &oset);
Another use of sigblock() is to get the current set of masked signals without changing what is actually blocked. Instead of:
int set;
set = sigblock(0);
Use the following:
sigset_t set;
sigprocmask(SIG_BLOCK, NULL, &set);
SEE ALSO
kill(2), sigaction(2), sigprocmask(2), sigsetmask(3), sigsetops(3)
HISTORY
The sigblock() function call appeared in 4.2BSD and has been deprecated.
BSD
August 10, 2002 BSD