#!/bin/sh switch="-U" current="-c" if [ "$1" = "-C" -o "$1" = "-U" -o "$1" = "-P" -o "$1" = "-M" ]; then switch="$1" shift elif [ "$1" = "-b" -o "$1" = "-e" ]; then current="$1 $2" shift 2 fi ledger $current -s $switch register "$@"