#! /bin/bash awk -F "" '{for(i=1;i<=NF;i++){if($i=="B" || $i=="b"){next;}if(i==NF){print $0}}}' nowcoder.txt