<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
I'm having trouble turning off echo in escript. If I put the following into a module:<BR>
<BR>
======================<BR>
-module(testecho).<BR>
-compile(export_all).<BR>
<BR>
main(_) -><BR>
io:setopts( standard_io, [ {echo, false} ] ),<BR>
P = io:get_line( standard_io, "Enter some stuff > "),<BR>
io:format( "~nYou entered ~p~n", [ P ] ).<BR>
======================<BR>
<BR>
and run it, I get the following:<BR>
<BR>
======================<BR>
$ erl<BR>
Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]<BR>
<BR>
Eshell V5.7.2 (abort with ^G)<BR>
1> c(testecho).<BR>
{ok,testecho}<BR>
2> testecho:main(hi).<BR>
Enter some stuff > <BR>
You entered "Hello\n"<BR>
ok<BR>
======================<BR>
<BR>
As you can see, "Hello" does not show up as I type, which is what I'm after. However, if I do the same in escript as follows:<BR>
<BR>
======================<BR>
#!/usr/bin/env escript<BR>
%% -*- erlang -*-<BR>
<BR>
main(_) -><BR>
io:setopts( standard_io, [ {echo, false} ] ),<BR>
P = io:get_line( standard_io, "Enter some stuff > "),<BR>
io:format( "~nYou entered ~p~n", [ P ] ).<BR>
======================<BR>
<BR>
<BR>
I get the following:<BR>
<BR>
======================<BR>
$ ./testecho.sh <BR>
Enter some stuff > Hello<BR>
<BR>
You entered "Hello\n"<BR>
<BR>
$<BR>
======================<BR>
<BR>
<BR>
The echo does not turn off. How do I get the echo to turn off in escript?<BR>
<BR>
Thanks,<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<BR>
</TD>
</TR>
</TABLE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<BR>
<FONT SIZE="2">A. G. Madi</FONT> <BR>
<B><FONT SIZE="2"><FONT COLOR="#067ab4">AT&T</FONT></FONT></B> <FONT SIZE="2">Chief Security Office (CSO)</FONT> <BR>
<BR>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
<!--[object_id=#att.com#]--><P align=left><FONT face=Tahoma size=2><FONT color=#0000ff><FONT face=Tahoma color=#000000 size=2>*****</FONT></P>
<P><FONT face=Tahoma color=#000000 size=2>The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA623</FONT></P></FONT></FONT></HTML>