for i in $(cat a b c | grep '^ii' | awk '{print $2}' | sort | uniq); do [(1) "$(grep "ii $i " a)" ] && [(1) "$(grep "ii $i " b)" ] && [(1) "$(grep "ii $i " c)" ] && sed(1) -i "/ii $i /d" a b c; done
for name [ [ in [ word ... ] ] ; ] do list ; done
       The  list of words following in is expanded, generating a list of items.  The variable name is set
       to each element of this list in turn, and list is executed each time.  If the in word is  omitted,
       the  for  command  executes  list  once  for each positional parameter that is set (see PARAMETERS
       below).  The return status is the exit status of the last command that executes.  If the expansion
       of  the  items  following  in  results  in an empty list, no commands are executed, and the return
       status is 0.
check file types and compare values
AND and OR lists are sequences of one of more pipelines separated by the &&  and  ||  control  operators,
respectively.  AND and OR lists are executed with left associativity.  An AND list has the form

       command1 && command2

command2 is executed if, and only if, command1 returns an exit status of zero.

An OR list has the form

       command1 || command2

command2  is  executed  if and only if command1 returns a non-zero exit status.  The return status of AND
and OR lists is the exit status of the last command executed in the list.
stream editor for filtering and transforming text
-i[SUFFIX], --in-place[=SUFFIX]

       edit files in place (makes backup if extension supplied)
If no -e, --expression, -f, or --file option is given, then the first non-option argument is taken as the
sed script to interpret.  All remaining arguments are names  of  input  files;  if  no  input  files  are
specified, then the standard input is read.
source manpages: [[[sed