07-15-2014
Hi All,
I am still waiting for other work around.
Please suggesst me
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
In my file I have an amount field from position 74 to 87, which contains values starting with '+' as well as '-'. I want to add all positive values in a varible called "CREDIT" and all negative values in a variable "DEBIT". I know, we can use grep to identify values with positive and... (4 Replies)
Discussion started by: berlin_germany
4 Replies
2. Shell Programming and Scripting
hi i am using printf in a script and it is not printing negative values..i have to use printf to get rid of the newline..here is my code:
fin=`echo $a - $b | bc`
printf "${fin}," >> test
these statements are in a loop. here is what i get when i try to subtract 4 from 8:
./scr1: line... (2 Replies)
Discussion started by: npatwardhan
2 Replies
3. Shell Programming and Scripting
Hello,
I have a list like this :
1
2
-4
0
-3
-7
5
6 etc.
Is there a way to remove all the positive values and print only the negative values, without using grep, sed or awk?
Thanks,
Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies
4. Shell Programming and Scripting
Hi all,
I have a file that looks like shown below. I want to find places where the value in column 2 change from negative to positive and vice versa and return the value on column 1 at that point. I wonder if this is possible in shell script or awk .. please help!
Here is the original data
... (6 Replies)
Discussion started by: malandisa
6 Replies
5. UNIX for Dummies Questions & Answers
Ok, so i monitor disk space on remote machines using snmp. Works great for me. But whenever a particular partition happens to have Terabytes of data, snmp starts reporting negative values.
Can someone please tell me how to get around this problem?
The AllocationUnit is 512 bytes. Weird... (0 Replies)
Discussion started by: SkySmart
0 Replies
6. Shell Programming and Scripting
a=10.02
pattern=-11.01
b=$(echo | awk '{ print $a*$pattern}')
echo $b
its not working even
ALso tried `expr $a \* $pattern`
No LUCK (3 Replies)
Discussion started by: saluja.deepak
3 Replies
7. Shell Programming and Scripting
Hi, i need help on replacing negative values in a column with 0. any quick fix on this? thanks much. for instance,
input:
1
2.3
-0.4
-25
12
13
45
-12
desired output
1
2.3
0
0
12
13
45 (4 Replies)
Discussion started by: ida1215
4 Replies
8. Shell Programming and Scripting
Can anyone please assist me?
Please find the attached input and output file for ur reference.
a)Incase if i get negative value (ex:-000100) in the 11th column then i have to convert the value to 0000000(7 zeros-length is 7) and then
print the entire record.
b)Incase if there is no... (2 Replies)
Discussion started by: vinus
2 Replies
9. Shell Programming and Scripting
Hi Gurus,
I have requirement need to sum the value, the logic is if the value is negative then time -1, I tried below two ways. one is failed, another one doesn't work.
awk -F"," '{if($8< 0 $8*-1 else $8) sum+=$8}{print sum, $8} END{printf("%.2f\n",sum)}'
awk -F","... (4 Replies)
Discussion started by: ken6503
4 Replies
LEARN ABOUT DEBIAN
selrecord
SELRECORD(9) BSD Kernel Developer's Manual SELRECORD(9)
NAME
selrecord, selwakeup -- record and wakeup select requests
SYNOPSIS
#include <sys/param.h>
#include <sys/selinfo.h>
void
selrecord(struct thread *td, struct selinfo *sip);
void
selwakeup(struct selinfo *sip);
DESCRIPTION
selrecord() and selwakeup() are the two central functions used by select(2), poll(2) and the objects that are being selected on. They handle
the task of recording which threads are waiting on which objects and the waking of the proper threads when an event of interest occurs on an
object.
selrecord() records that the calling thread is interested in events related to a given object. If another thread is already waiting on the
object a collision will be flagged in sip which will be later dealt with by selwakeup().
selrecord() acquires and releases sellock.
selwakeup() is called by the underlying object handling code in order to notify any waiting threads that an event of interest has occurred.
If a collision has occurred, selwakeup() will increment nselcoll, and broadcast on the global cv in order to wake all waiting threads so that
they can handle it. If the thread waiting on the object is not currently sleeping or the wait channel is not selwait, selwakeup() will clear
the TDF_SELECT flag which should be noted by select(2) and poll(2) when they wake up.
The contents of *sip must be zeroed, such as by softc initialization, before any call to selrecord() or selwakeup(), otherwise a panic may
occur. selwakeup() acquires and releases sellock and may acquire and release sched_lock.
SEE ALSO
poll(2), select(2)
AUTHORS
This manual page was written by Chad David <davidc@FreeBSD.org> and Alfred Perlstein <alfred@FreeBSD.org>.
BSD
June 13, 2007 BSD