Fulltext results:
- Compare directories
- ====== Compare directories ====== For each 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 option ''-d'' of ''sort'', to get compareable results on different machines. After th
- 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'' ... server's URL (''$UPDATE_URL'') are read from the config file ''~/.dyndns.cfg''. Here an example config file: <file bash dyndns.cfg> LOGIN="jdoe:secret"
- Change Encoding with iconv
- ====== Change Encoding with iconv ====== ===== Convert Single File ===== iconv -f iso-8859-1 -t utf-8 -o OUTPUT.txt INPUT.txt Converts ''INPUT.txt'' from ''iso-8859-1'' to ''utf-8'' and writes it to ''OUTPUT.txt''. ===== Convert All Files in a Directory ===== <code bash> for f in $(find . -type f) do iconv -f iso-8859-1
- 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}}
- Command Line Tools Used in My Scripts
- ====== Command Line Tools Used in My Scripts ====== This is a list of comman dline tools which I use in my scripts an whic
- root login with bash
- ing with ''/bin/bash'' is much easier. Using this command, you can directly log in as ''root'' with a ''bash'' shell. ssh demo.lab.example.com -t "su - root -c /bin/bash"' I set it up as an ... ashrc'': alias demo_root='ssh demo.lab.example.com -t "su - root -c /bin/bash"' This enables me lo
- exiftool
- H%M%S%%-c.%%e "-filename<CreateDate" *.jpg ===== Correct the Date of Photos ===== To shift the photo