Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. $ zmodload zsh/zpty
  2. $ zpty PW passwd $1
  3. $ zpty PW passwd $1
  4. # ``-r'': read the output of the command name.
  5. # ``z'' : Parameter
  6. $ zpty -r PW z '*password:'
  7. # send the to command name the given strings as input
  8. $ zpty -w PW $2
  9. $ zpty -r PW z '*password:'
  10. $ zpty -w PW $2
  11. # The second form, with the -d option, is used to delete commands
  12. # previously started, by supplying a list of their names. If no names
  13. # are given, all commands are deleted. Deleting a command causes the HUP
  14. # signal to be sent to the corresponding process.
  15. $ zpty -d PW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement