#!/bin/sh if [ "$1" == "-l" ]; then logname=$2 shift 2 else logname=$(date +%y%d%h%M%S) fi telnet $* | tee -a /var/log/$logname exit