script

4 scripts para el trabajo sucio con mysql

Tras varias ocasiones en que he ofrecido a algún colega uno de estos scripts me he decidido a juntarlos todos en el mismo sitio y compartirlos formalmente. Se trata de un puñado de scripts que en el pasado implementé según me hicieron falta para resolver o cubrir alguna necesidad.

RTFM or just code: recursively compare directories and files in two paths

Recursively comparing directories and files in two provided paths is probably a common problem and for sure there's a solution out there.

bad. I didn't find (search for) one before coding my own solution. I just did search intensively for such a solution before writing this post (to avoid that comment saying something like: hey man it was solved twenty years back!). The simplest solution, using diff:

$ diff -r -q /tmp/a /tmp/b
Only in /tmp/a/b: c
Only in /tmp/a/b/d: a.txt
Only in /tmp/b/b: y.txt
Files /tmp/a/x.txt and /tmp/b/x.txt differ
Subscribe to RSS - script