Posted By


endorfin on 01/13/09

Tagged


Statistics


Viewed 660 times
Favorited by 0 user(s)

Zwei Verzeichnisse vergleichen


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

Alle Verzeichnisse überprüfen: [script name] verzeichnis1 verzeichnis2
Alle Dateien vom Typ *html: [script name] verzeichnis1 verzeichnis2


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2.  
  3. cr='*'
  4. if [ -z $3 ]; then cr=$3; fi
  5.  
  6. for f in `find $1/$3 -type f | sed "s|$1/||"`
  7. do
  8. printf "===!%-76s" "$f!" | tr ' !' '= '; echo
  9. diff $1/$f $2/$f | sed -e "s/^</$1: /" -e "s/^>/$2: /"
  10. done

URL: http://www.shell-fu.org/lister.php?id=480

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.