If I could get any explanations on why the code below doesn't work it would be great !
My input looks like that ("|" delimited):
The goal is, if $2 is "ok", to remove everything before the pattern given in the match function below. Otherwise keep the original string in $1:
in order to get:
But when the record matches $2 but not the regex inside "match", I don't understand why it removes the first character:
If someone could explain that to me please.
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Looking for awk statement that will match all lines starting with "# "
if ( $1 == \^"#" )
Input file:
# of the server. If you would like to set these, please take out the
# pound (#) sign in front of one or all severities and set it equal to
# severity desired. For example, FATAL=3
#... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi, everyone.
I need to write a program to get io info based on libperfstat.
But the "write time" of a disk is just half of the value get from iostat.
I'm confused and can't explain. Help please.
How I calculate "write service time per sec":
In iostat:
write service... (0 Replies)
I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for:
my.cnf
/bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf
after this match I want to search back and match the hostname which is x number of lines back, above the... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
LEARN ABOUT OPENDARWIN
fixadd
fixadd(3alleg4) Allegro manual fixadd(3alleg4)NAME
fixadd - Safe function to add fixed point numbers clamping overflow. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixadd(fixed x, fixed y);
DESCRIPTION
Although fixed point numbers can be added with the normal '+' integer operator, that doesn't provide any protection against overflow. If
overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it will
set `errno' and clamp the result, rather than just letting it wrap. Example:
fixed result;
/* This will put 5035 into `result'. */
result = fixadd(itofix(5000), itofix(35));
/* Sets `errno' and puts -32768 into `result'. */
result = fixadd(itofix(-31000), itofix(-3000));
ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the clamped result of adding `x' to `y', setting `errno' to ERANGE if there was an overflow.
SEE ALSO fixsub(3alleg4), fixmul(3alleg4), fixdiv(3alleg4)Allegro version 4.4.2 fixadd(3alleg4)