fork download
  1. #!/bin/bash
  2. # your code goes here
  3. awk 'BEGIN{FS=";";IGNORECASE=1;}
  4. {
  5. print $1,$2,$3;
  6. if($3 ~ /him/ || $2 ~ /him/ )
  7. {
  8. print "--> To be removed !";
  9. count=count+1;
  10. }
  11. }END{if(count=="0"){print $1,$2,$3;}}'
Success #stdin #stdout 0s 4456KB
stdin
a;b;c
101;jd;handhu
102;jshds;hdudd
103;jhd;hmaja
stdout
a b c
101 jd handhu
102 jshds hdudd
103 jhd hmaja