Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ zmodload zsh/zpty
- $ zpty PW passwd $1
- $ zpty PW passwd $1
- # ``-r'': read the output of the command name.
- # ``z'' : Parameter
- $ zpty -r PW z '*password:'
- # send the to command name the given strings as input
- $ zpty -w PW $2
- $ zpty -r PW z '*password:'
- $ zpty -w PW $2
- # The second form, with the -d option, is used to delete commands
- # previously started, by supplying a list of their names. If no names
- # are given, all commands are deleted. Deleting a command causes the HUP
- # signal to be sent to the corresponding process.
- $ zpty -d PW
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement