Hi,
I am trying to write a script to extract multiple sets of data from a chemistry output file. The problem section is in the following format...
Geometry "geometry" -> "geometry"
1 Pd 46.0000 -0.19290971 0.00535260 0.02297606
2 P ... (7 Replies)
Hi,
I' using bash and I would like to use "bc" to compute the ratio of of two numbers and assign the ratio to a variable.
The numbers are in a file, e.g.
196.304492
615.348986
Any idea how to do it?
N.B. I cannot change the file to have 196.304492 / 615.348986 as the file is produced by... (14 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Hello folks
I Hope everyone is fine. I am calculating number of bytes calculation from apache web log.
awk '{ sum += $10 } END { print sum }' /var/httpd/log/mydomain.log
7.45557e+09
it show above number, what should i do it sow number like 7455, i mean if after decimal point above 5 it... (5 Replies)
Hi !
How to increment a varibale in ksh.
#!/bin/ksh
set -x
RELEASE_NUM=5.2.103
VAL=0.0.1
RELEASE_NUM=`echo $RELEASE_NUM + $VAL | bc`
echo $RELEASE_NUM
The above code is throwing this error.
+ RELEASE_NUM=5.2.103 (2 Replies)
Hi All,
I have a problem to find number of lines per column smaller than the values given in a different file. In example, compare the 1st column of file1 with the 1st line of the file2, 2nd column of file1 with the 2nd line of the file2, etc
cat file1
0.2 0.9 0.8 0.5 ...
0.6 0.5... (9 Replies)
I have a number, which I want to convert into the nearest floating number upto two places after the decimal point.
E.g.
1.2346 will become 1.23
but
1.2356 will become 1.24 .
Similarly
0.009 will be 0.01
and
0.001 will be 0.00 or 0.0 (not 0, wnat to keep the decimal... (1 Reply)
Hello Guys,
I have a floating point number 1.14475E+15 I want to convert this number in to full number (Integer or Big integer). I tried couple of functions it did not work. When I use INT=${FLOAT/.*} I am getting value as 1. I don't want a truncated value
#!/bin/bash
#... (9 Replies)
Hello, I have two edgelists. One bigger list master.txt and a subset of that, child.txt. I want to print out all the edges in master.txt which is not there in child.txt. I have done it the Python way, but its taking way to much time as the number of edges are huge. (one thing is that A-B and B-A... (7 Replies)
Discussion started by: Sanchari
7 Replies
LEARN ABOUT LINUX
sigsuspend
SIGSUSPEND(P) POSIX Programmer's Manual SIGSUSPEND(P)
NAME
sigsuspend - wait for a signal
SYNOPSIS
#include <signal.h>
int sigsuspend(const sigset_t *sigmask);
DESCRIPTION
The sigsuspend() function shall replace the current signal mask of the calling thread with the set of signals pointed to by sigmask and
then suspend the thread until delivery of a signal whose action is either to execute a signal-catching function or to terminate the
process. This shall not cause any other signals that may have been pending on the process to become pending on the thread.
If the action is to terminate the process then sigsuspend() shall never return. If the action is to execute a signal-catching function,
then sigsuspend() shall return after the signal-catching function returns, with the signal mask restored to the set that existed prior to
the sigsuspend() call.
It is not possible to block signals that cannot be ignored. This is enforced by the system without causing an error to be indicated.
RETURN VALUE
Since sigsuspend() suspends thread execution indefinitely, there is no successful completion return value. If a return occurs, -1 shall be
returned and errno set to indicate the error.
ERRORS
The sigsuspend() function shall fail if:
EINTR A signal is caught by the calling process and control is returned from the signal-catching function.
The following sections are informative.
EXAMPLES
None.
APPLICATION USAGE
Normally, at the beginning of a critical code section, a specified set of signals is blocked using the sigprocmask() function. When the
thread has completed the critical section and needs to wait for the previously blocked signal(s), it pauses by calling sigsuspend() with
the mask that was returned by the sigprocmask() call.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
Signal Concepts , pause() , sigaction() , sigaddset() , sigdelset() , sigemptyset() , sigfillset() , the Base Definitions volume of
IEEE Std 1003.1-2001, <signal.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 SIGSUSPEND(P)