On Fri, 10 Oct 2003 16:36:18 -0500 "Austad, Jay" <JAustad at temgweb.com> wrote: > So, say I have a shell script, that looks like this > > echo -n "User:" > read > echo -n "Pass:" > read > /usr/sbin/someproprietaryprogram > break > Warning: I'm by no means a good shell scripter, but why do you need the break? At the termination of the /usr/sbin/someproprietaryprogram it would terminate anyways. > > 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? > Umm, just a thought, but couldn't you have them enter it in like this: username:password -or- username password Not sure why you need to only do an LF and not a CRLF. Personally, I would set it up something like this: echo -n "User:" > read user > echo -n "Pass:" > read pass > /usr/sbin/someproprietaryprogram > break Not sure how you want to tie in those to the proprietary program, but if you needed to combine them into one line couldn't you do something like: "${user}:$pass" Apologies if this is well below what you're trying to do. I'm still fairly new to shell script writing. -- Shawn The difficult we do today; the impossible take a little longer. Ne Obliviscaris -- "Forget Not" _______________________________________________ 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