Article 53X7R Shell script copy files to another path

Shell script copy files to another path

by
BringMara
from LinuxQuestions.org on (#53X7R)
I have to make a shell script which compares 2 files line by line and finds different lines.If the number of the different lines is greater than 20,then I have to copy the 2 files to another path and then archive and delete the files.Dir1 and dir2 are the 2 files.What I came up with is:
#!/bin/bash
If [ $(diff dir1 dir2 |wc -l)" -gt 20" ] then
I know I need the cp command but I don't know how to write it exactly.I alsoo need tar for archives and rm $file to deletelatest?d=yIl2AUoC8zA latest?i=PivMR2GmLZo:mTkg1NLyRkE:F7zBnMy latest?i=PivMR2GmLZo:mTkg1NLyRkE:V_sGLiP latest?d=qj6IDK7rITs latest?i=PivMR2GmLZo:mTkg1NLyRkE:gIN9vFwPivMR2GmLZo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments