So, say I have a shell script, that looks like this

echo -n "User:"
read
echo -n "Pass:"
read
/usr/sbin/someproprietaryprogram
break


And this script runs from inetd listening on some arbitrary port, say 40000.
The username and password do not matter, I just ask for them and wait for a
response because the remote program that connects to port 40000 needs it.  I
know this isn't the most secure way to do this, but it's locked down with
iptables rules and it's internal only. 

So anyway, this remote program sends the username after it sees the user
prompt, and then sends a linefeed.  "read" expects a CRLF.  So, I either
need to figure out how to make read just expect an LF, or convert this to
perl and make that handle it properly.

I'm assuming if I did it in perl I'd just have a loop that read every
character, and broke out of the loop when it saw an LF.  Right?

-jay

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list