Hi ,
could any one suggest me that how to determine if the first field is numeric and if it is greater than another number then from that point everything else should be printed using awk.
I have tried this
:
awk -v xxxx=$xxxxx '
BEGIN {
enable=0
}
{
print $1
if ( ( $1 !~ "^*$" ... (5 Replies)
Hi all,
I need help in following scenario. I have a file with about 10,000 lines. There are several lines which have word "START" (all upper case) in them. I want to grep line with word "START" and then do the following
1. Print the line number having word "START"
2. Print the next 11 lines.
... (4 Replies)
Hi, i was looking for unix command(s) for :
find the first occurrence of a given pattern with in a file and print the remaining part.
below is an example of what i am looking for:
lets say, a file named myfile.txt
now, the command i am looking for will do the following (4 Replies)
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
I have several very large file that are extracts from Oracle tables. These files are formatted in XML type syntax with multiple entries like:
<ROW>
some information
more information
</ROW>
I want to grep for some words, then print all lines between <ROW> AND </ROW>. Can this be done with AWK?... (7 Replies)
Hi,
i would like to get the above and below lines of the grep pattern .
For ex :
file as below:
chk1- aaaa
1-Nov
chk2 -aaaa
##########
chk1-bbbbbb
1-Nov
chk2-bbbbbb
#########
my search pattern is date : 1-Nov
i need the o/p as below
chk1- aaaa
1-Nov (6 Replies)
Hi
I have this in my file
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11 system-alert-00012: UDP flood! From xxxxxx to yyyyyyyyyy, int ethernet0/2). Occurred 1 times.
2011-04-18 15:32:11... (9 Replies)
Hi ,
My record file , need to print up to above (DATA array)(there may be n no lines ) , grep "myvalue" row now .....suggest me some options
--- DATA Array---
record type xxxxx
sequence type yyyyy
2
3---> data1
/dev/
--- DEVICE ---
MAXIMUM_People=
data_blocks=
MY_value=2
xyz
abc ... (0 Replies)
Hello there
I'd like to make a copy of 2nd column and have it printed in place of column 1. Remaining columns are needed as it.
test data:
ProbeSet GeneSymbol X22565285 X22566285
ILMN_1050008 MYOCD 6.577 7.395
ILMN_1050014 GPRC6A 6.595 6.668
ILMN_1050017 ... (2 Replies)
Discussion started by: genome
2 Replies
LEARN ABOUT MOJAVE
check_int32_add
CHECK_INT32_ADD(3) BSD Library Functions Manual CHECK_INT32_ADD(3)NAME
check_int32_add, check_uint32_add, check_int64_add, check_uint64_add, check_int32_sub, check_uint32_sub, check_int64_sub, check_uint64_sub,
check_int32_mul, check_uint32_mul, check_int64_mul, check_uint64_mul, check_int32_div, check_uint32_div, check_int64_div, check_uint64_div,
-- detect overflow in arithmetic
SYNOPSIS
#include <checkint.h>
int32_t
check_int32_add(int x, int y, int *err);
uint32_t
check_uint32_add(int x, int y, int *err);
int64_t
check_int64_add(int x, int y, int *err);
uint64_t
check_uint64_add(int x, int y, int *err);
int32_t
check_int32_sub(int x, int y, int *err);
uint32_t
check_uint32_sub(int x, int y, int *err);
int64_t
check_int64_sub(int x, int y, int *err);
uint64_t
check_uint64_sub(int x, int y, int *err);
int32_t
check_int32_mul(int x, int y, int *err);
uint32_t
check_uint32_mul(int x, int y, int *err);
int64_t
check_int64_mul(int x, int y, int *err);
uint64_t
check_uint64_mul(int x, int y, int *err);
int32_t
check_int32_div(int x, int y, int *err);
uint32_t
check_uint32_div(int x, int y, int *err);
int64_t
check_int64_div(int x, int y, int *err);
uint64_t
check_uint64_div(int x, int y, int *err);
DESCRIPTION
The check_<type>_<operation>(x, y, err) family of functions perform the specified arithmetic operation (addition, subtraction, multiplica-
tion, or division) with the left operand of x and right operand of y and return the arithmetic result with the specified type.
Either operand x or y (or both) can be of any type that is compatible to signed or unsigned 8-bit, 16-bit, 32-bit, or 64-bit integers.
The err argument is or'ed by flags in the function to indicate if an overflow has occurred. The possible flag values are:
CHECKINT_NO_ERROR no overflow has occurred
CHECKINT_OVERFLOW_ERROR overflow has occurred
CHECKINT_TYPE_ERROR operand is of an incompatible type
The err argument is not cleared in calls to the check_<type>_<operation>(x, y, err) functions. Detected overflow persists in the err argu-
ment until err is reset to CHECKINT_NO_ERROR.
RETURN VALUES
If successful, the check_<type>_<operation>() functions will return the arithmetic result of performing the operation with left operand x and
right operand y (even when overflow error occurs).
If any other error occurs, the return value is -1 and the argument err will be set to indicate the error.
EXAMPLES
/* Create a variable to store overflow flag */
int32_t err = CHECKINT_NO_ERROR;
/* Use checkint API to perform an arithmetic operation and
* store result in variable. */
int32_t arithmetic_result = check_int32_add(UINT_MAX, 1, &err);
/* Check status of overflow flag */
if (err & CHECKINT_OVERFLOW_ERROR) {
/* Perform overflow resolution code */
fprintf(stderr, "Overflow detected!
");
}
/* Check for type error */
else if (err & CHECKINT_TYPE_ERROR) {
/* Deal with incompatible types error */
fprintf(stderr, "Incompatible types!
");
}
/* Reset overflow flag for next operation */
err = CHECKINT_NO_ERROR;
ERRORS
The check_<type>_<operation>() functions may fail if:
[CHECKINT_TYPE_ERROR] operand is of an incompatible type
HISTORY
The checkint() API was introduced in Mac OS X 10.5.
BSD April 20, 2007 BSD