Search Results

Search: Posts Made By: markymarkg123
1,459
Posted By Corona688
The requirement to look ahead makes things a lot...
The requirement to look ahead makes things a lot more complicated.

awk 'BEGIN { MAX=5000; getline; x=$1 }
((d=$1-x)>=MAX) { MAX=d; MAXNR=NR; L=10; }
((--L) == 0) {
...
1,459
Posted By Corona688
If your output has nothing to do with the input...
If your output has nothing to do with the input shown, I can't guess much from it. :p With your explanation I think I get it now. If you see a spike, you want to print the line, then suppress any...
2,255
Posted By Don Cragun
I'll try. First, here is the awk script in a...
I'll try. First, here is the awk script in a slightly different form:
line 1 awk '
line 2 (NR>1) && (d=$2-x)>=100{print d,NR}
line 3 {x=$2}
line 4 ' file
The line numbers in blue are to make it...
2,255
Posted By Don Cragun
Your step 3 makes no sense to me. If y-x is not...
Your step 3 makes no sense to me. If y-x is not >= 100, then (y+1)-(x+1) can't be >= 100 either. This will just create an very large loop until one of the values overflows. So, until you can...
278,811
Posted By Neo
Simple rules of the UNIX.COM forums:
RULES OF THE UNIX AND LINUX FORUMS

For the latest version of the community rules (the official community rules page), please visit here. (https://www.unix.com/misc.php?do=cfrules)


No flames,...
Showing results 1 to 5 of 5

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