erlang - How to work around limitation in io:setopts([{echo, false}]) with io:getline/1 -


I'm trying to put a password prompt in my app and io: get_line / 1 , The characters that write, they write stdout.

After the documentation, I am trying to do io: setopts ([echo, wrong}] returns the returns {error, enotsup} and do not start echoing successfully.

I open / dev / stdin and / dev / stdout directly because it is not a multi-platform Any recommendations for working around the range of echo with Io: setopts code>, or what I'm trying to do Find an alternative way to complete

Unfortunately, there is currently no easy way to do this. Older versions of scripts Io server Do not use either io: setopts ([[resonant, false]]) neither io: get_password () work with ascript. The best solution for reading the passwords is:

  read-password ./script $ password   

where ASScript is something like this:

  #! / Usr / bin / env escript main ([password]) - & gt; Io: Format ("-> ~ p \ n", [password]).    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -