Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. script.sh fileA fileB fileC
  2.  
  3. rm $3
  4. while IFS="" read -r inputline; do
  5.  
  6. fgrep -q ""$inputline"" $1
  7. if [ 1 -eq $? ]; then
  8. echo ""$inputline"" >>$3
  9. fi
  10. done <$2
  11.  
  12. #!/usr/bin/bash
  13. rm "$3"
  14. while IFS="" read -r inputline
  15. do
  16. grep -Fq "$inputline" "$1" && echo "$inputline" >> "$3"
  17. done < "$2"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement