#!/usr/bin/ksh
# echo "Enter market: \c"
# read market
# echo "Enter username: \c"
# read username
# echo "Enter password: \c"
# read password
market=$1
dt=$(date +%m%d%y)
username=test
password=test
for x in 1
do
{
echo $username
sleep 5
echo $password
sleep 10
echo "print tester.log"
sleep 60
echo "exit;"
}|telnet $market>>/export/home/tester/log/$market.DAILY_$dt
done
Bare with me, I will try to explain what I'm trying to accomplish.
My cron launches a get_tester file that runs this script against 8 different markets. I only want to telnet into each market one time, however I want to print the tester.log file to to the /export/home/tester/log directory then have another do statement to allow me to stay telneted in but print a different file directed to a different file.
Something like this ?
do
{
echo $username
sleep 5
echo $password
sleep 10
echo "print tester.log"
sleep 60
echo "exit;"
}|telnet $market>>/export/home/tester/log/$market.DAILY_$dt
do
{
echo "print helpme.log"
sleep 10
| $market>>/export/home/helpme/log/$market.DAILY_$dt
)
done
done
Please help
# echo "Enter market: \c"
# read market
# echo "Enter username: \c"
# read username
# echo "Enter password: \c"
# read password
market=$1
dt=$(date +%m%d%y)
username=test
password=test
for x in 1
do
{
echo $username
sleep 5
echo $password
sleep 10
echo "print tester.log"
sleep 60
echo "exit;"
}|telnet $market>>/export/home/tester/log/$market.DAILY_$dt
done
Bare with me, I will try to explain what I'm trying to accomplish.
My cron launches a get_tester file that runs this script against 8 different markets. I only want to telnet into each market one time, however I want to print the tester.log file to to the /export/home/tester/log directory then have another do statement to allow me to stay telneted in but print a different file directed to a different file.
Something like this ?
do
{
echo $username
sleep 5
echo $password
sleep 10
echo "print tester.log"
sleep 60
echo "exit;"
}|telnet $market>>/export/home/tester/log/$market.DAILY_$dt
do
{
echo "print helpme.log"
sleep 10
| $market>>/export/home/helpme/log/$market.DAILY_$dt
)
done
done
Please help