Hi All,
I have an input below. If the term in the 1st column is equal, print the last row which 1st column is equal.In the below example, it's " 0001 k= 27 " and " 0004 k= 6 " (depicted in bold). Those terms in 1st column which are not repetitive are to be printed as well. Can any body help me... (9 Replies)
Hi,
I want to get script or command in Sun Unix which matches first fields of both the files and print the feilds of one files, example may make it more clear.
InputFile1
==================
Alex,1,fgh
Menthos,45454,toto
Gothica,855,ee
Zenie4,77,gg
Salvatore,66,oo
Dhin,1234,papapa... (3 Replies)
Hi All,
I have to match each row in file 1 with 1st row in file 2 and print the corresponding column from file2. I am trying to use an awk script to do this. For example
cat File1
X1
X3
X4
cat File2
ID X1 X2 X3 X4
A 1 6 2 1
B 2 7 3 3
C 3 8 4 1
D 4 9 1 1 (3 Replies)
Hi all
I have another question as of now.
I have two files
One file contain
data like this
Serendipity
glamerus
Shenpurity
In another file these entries are present in different columns like this from 2 column onwards
SRN Serendipity Non serendipity ... (1 Reply)
Here is my file:
700 7912345678910
61234567891234567891
700 8012345678910
61234567891234567891
I want to pull all lines that begin with '700' only if columns 11-12 are '79'.
My code so far only pulls the '79', not the whole line:
grep ^700 file1 | cut -c 11,12 |... (7 Replies)
Hello,
I have two files which are of the following format
File 1 which has two columns
Protein_ID Substitution
NP_997239 T53R
NP_060668 V267M
NP_058515 P856A
NP_001206 T55M
NP_006601 D371Y ... (2 Replies)
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
In the awk below I am trying to match the value in $4 of file1 with the split value from $4 in file2. I store the value of $4 in file1 in A and the split value (using the _ for the split) in array. I then strore the value in $2 as min, the value in $3 as max, and the value in $1 as chr.
If A is... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT OSX
memset_s
MEMSET_S(3) BSD Library Functions Manual MEMSET_S(3)NAME
memset_s -- copy a value to all bytes of a memory buffer
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#define __STDC_WANT_LIB_EXT1__ 1
#include <string.h>
errno_t
memset_s(void *s, rsize_t smax, int c, rsize_t n);
DESCRIPTION
The memset_s() function copies the value c (converted to an unsigned char) into each of the first n bytes of the memory buffer whose starting
address is given by s.
It is a runtime-consrtaints violation if s is a null pointer, or if either of smax or n is larger than RSIZE_MAX, or if smax is smaller than
n. If there is a runtime-constraints violation, and if s is not a null pointer, and if smax is not larger than RSIZE_MAX, then, before
reporting the runtime-constraints violation, memset_s() copies smax bytes to the destination.
In contrast to the memset(3) function, calls to memset_s() will never be ``optimised away'' by a compiler. This property is required by the
following sentences in section K.3.7.4.1 of ISO/IEC 9899:2011 (``ISO C11''):
Unlike memset(), any call to the memset_s() function shall be evaluated strictly according to the rules of the abstract machine as
described in (5.1.2.3). That is, any call to the memset_s() function shall assume that the memory indicated by s and n may be accessi-
ble in the future and thus must contain the values indicated by c.
RETURN VALUES
The memset_s() function returns zero for success, or a non-zero error code if there was a runtime-constraints violation.
ERRORS
memset_s() returns the following error codes. It does not store the error code in the global errno variable:
[EINVAL] The s argument was a null pointer.
[E2BIG] One or both of smax or n was larger than RSIZE_MAX.
[EOVERFLOW] n was larger than smax.
SEE ALSO memset(3).
STANDARDS
The memset_s() function conforms to ISO/IEC 9899:2011 (``ISO C11''), except that the set_constraint_handler_s() interface is not supported.
BSD February 21, 2012 BSD