All pastes #609979 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-09 05:24 UTC
rendered paste body
#!
#you may need to add the path to your shell

#set newtime as the date
newtime=$(date +%y%d%h%M%S)

#set logfilename to logname, shift to set telnet arguments properly


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


exit