AWK

awk is a programming language designed for text processing and typically used on Unix-like systems. It is a standard feature of many GNU/Linux distributions and Mac OS X.
CLICK HERE To solve more code-related solutions you face every day.

AWK/sed – write a text in a text file before number which is lower than specific value

With your shown samples, could you please try following. awk ‘ /^\[/{ next } { for(i=1;i<=NF;i++){ if($i>=1 && $i<=58050){ tempfirstGroup=(tempfirstGroup?tempfirstGroup OFS:””)$i } if($i>=58051 && $i<=116100){ tempsecondGroup=(tempsecondGroup?tempsecondGroup OFS:””)$i } } if(tempfirstGroup){ …

AWK/sed – write a text in a text file before number which is lower than specific value Read More »

Scroll to Top