unix:zsh

Shell Scripting

function require_curl() { which "curl" &>/dev/null; }
function debug() { ((DEBUG)) && echo ">>> $*"; }
...
debug "Starting database import."
URL=${URL:-http://localhost:8080}

Tips

  • Use hashtags for commands to easily find them again in your history.

How-Tos

<ESC> e
<ESC> .
reset
ls -l =curl
<C-e>d
zmv -Q '(**/)(*).txt' '$1$2.md'

dry run:

zmv -n 'maillog(*)' 'maillog_old${1}'

Resources

  • unix/zsh.txt
  • Last modified: 2019-08-28T13:00:00+0200
  • by Wolfgang