Search Results

Search: Posts Made By: manuswami
28,195
Posted By Franklin52
Another one: awk '{p=$0; v=$2; getline; d=$2 -...
Another one:
awk '{p=$0; v=$2; getline; d=$2 - v} d > 100 || d < -100 {print p}' file
28,195
Posted By radoulov
awk 'NR > 1 { x = s - $2 if ((x > 0 ? x :...
awk 'NR > 1 {
x = s - $2
if ((x > 0 ? x : -x) > 100)
print f, s
}
{
f = $1; s = $2
}' infile
28,195
Posted By Scrutinizer
And another one: awk '($2-p)^2>10000 && s{print...
And another one:
awk '($2-p)^2>10000 && s{print s}{s=$0;p=$2}' infile
28,195
Posted By balajesuri
awk 'NR % 2 != 0 {a=$1; b=$2} NR % 2 == 0 {if (b...
awk 'NR % 2 != 0 {a=$1; b=$2} NR % 2 == 0 {if (b - $2 > 100 || $2 - b > 100){print a,b}}' inputfile
40,529
Posted By Franklin52
Or with awk: awk...
Or with awk:
awk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r[(NR-c+1)%b];print;c=a}b{r[NR%b]=$0}' b=3 a=5 s="abcd" file

Use nawk or /usr/xpg4/bin/awk on Solaris.
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 02:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy