Search Results

Search: Posts Made By: Amanda Low
1,318
Posted By elixir_sinari
awk -F'\t' 'p1!=$1{c=1;n=1} {$(NF+1)= "Fr" $1...
awk -F'\t' 'p1!=$1{c=1;n=1}
{$(NF+1)= "Fr" $1 "." n}
!(c%5){n++}
{c++;p1=$1}1' OFS='\t' file
1,318
Posted By pamu
Try awk '{a++;if(!(a%5) || NR==1){s++} ...
Try


awk '{a++;if(!(a%5) || NR==1){s++}
{if(P != $1){s=1;a=0}}
{P=$1;$(NF+1)="Fr"$1"."s}}1' file
3,467
Posted By itkamaraj
Gnu grep has -C option try this grep -C...
Gnu grep has -C option

try this

grep -C 2 "abc1.1" input.txt
Showing results 1 to 3 of 3

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