Patch between different directories

/ Published in: Bash
Save to your folder(s)

Copy this code and paste it in your HTML
  1. dirs=$(for dir in $(ls); do echo -n "$dir " ; done)
  3. for (( i=0 ; i<${#dirs[@]}-1; i++ ))
  4. do
  5. diff -ru ${dirs[$i]} ${dirs[(($i+1))]} > ${dirs[(($i+1))]}_changes.patch
  6. done

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.