#!/bin/sh if [ $# -lt 1 ]; then echo "usage: btadd URL..." >&2 exit 1 fi for file in "$@"; do if [ -r "$file" ]; then rsc nerv.dolda2000.com btadd - <"$file" && rm -f "$file" elif [[ "$file" == http*://* ]]; then rsc nerv.dolda2000.com btadd "$file" else echo "rbtadd: $file: unreadable" >&2 fi done