Fulltext results:
- Compare directories
- ach of the directories, generate a digest file: <code bash> find DIR -type f -exec shasum {} + | LC_ALL=C sort -d -k 2 > shasums.txt </code> It's important to use ''LC_ALL=C'' and the opti... After that, you can diff the two shasums.txt: <code bash> diff shasums1.txt shasums2.txt </code> Or you use Meld as graphical diff tool: <code bash> meld
- Shell Script Variables
- aracter ===== Get the last character of ''$a'': <code bash> ${a: -1} </code> ===== Remove Slash from the End of a Variable ===== Remove a trailing slash from ''$a'': <code bash> a=${a%/} </code> {{tag>scripting bash sysadmin variable}}
- Change Encoding with iconv
- . ===== Convert All Files in a Directory ===== <code bash> for f in $(find . -type f) do iconv -f is... ${f}_$$_TEMP ${f} \ && mv ${f}_$$_TEMP ${f} done </code> {{tag>sysadmin convert encoding shell cli}}
- DynDNS Updates without a Client
- cript does the job as good as any other client. <code bash dyndns-update.sh> #! /bin/bash . ${HOME}/.... {LOGIN} "${UPDATE_URL}?hostname=${domain}" done </code> First, the login credentials (the ''$LOGIN'' va