for sam in `cut -f1 sam.list` do awk '$1!~/Y/' bak/$sam.pcov > $sam.pcov #awk '{if(NR>1){print $1"\t"$2"\t"$3"\t"$4"_"NR-1"\t"$5}else{print $0}}' bak/$sam.pcov | awk -v end=0 'BEGIN{OFS="\t"}{if($2==end){$2+=1};print $0;end=$3 }' > $sam.pcov done