Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script control

Status
Not open for further replies.

linmac

Technical User
Aug 21, 2002
7
MY
I am just join this group, and this is my 1st post/?

I have a script like this (ftptkf.sh):

#!/usr/bin/sh
echo "Password \c: "
read pass
ftp -inv <<END
open 172.18.10.101
user `echo $LOGNAME` $pass
ls
bye
END
exit 0

this script I want to call from another system menu/script, the problem is, went user type wrong password, every system error message is come out into user screen, how do I control that. thanx in advance.
 
You probably need to redirect standard error messages by adding a 2> /dev/null at the end of

user `echo $LOGNAME` $pass

Not sure if this will work within ftp though. Let us know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top