Guest User

Untitled

a guest
Sep 18th, 2021
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/bash
  2.  
  3. line="$1"
  4.  
  5. tg=$(echo "$line" | awk '{print $2}')
  6. remove="false"
  7.    
  8. while read -r tag ; do
  9.     if [[ "$tg" == "$tag" ]] ; then
  10.         remove="true"
  11.         break
  12.     fi
  13. done < tags_to_delete
  14.  
  15. if [ "$remove" = "true" ] ; then
  16.     echo "$line -- $tg"
  17. else
  18.     echo "OK:                    $line"
  19.     echo $line >> filtered_tags.txt
  20. fi
  21.  
RAW Paste Data