Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [username@resetpw (0)]$cat inputtest.sh
- #!/bin/sh
- echo "Enter ID : "; read username
- echo "Enter New password : "; read password
- echo "get user id " $username " and password " $password
- [username@resetpw (0)]$./inputtest.sh
- Enter ID :
- hello
- Enter New password :
- worldpasswd
- get user id hello and password worldpasswd
- [username@resetpw (0)]$
- [username@resetpw (0)]$./inputtest.sh<<EOF
- > hello
- > worldpasswd
- > EOF
- Enter ID :
- Enter New password :
- get user id hello and password worldpasswd
- [username@resetpw (0)]$
- [username@resetpw (0)]$echo hello>tempfile
- [username@resetpw (0)]$echo worldpasswd>>tempfile
- [username@resetpw (0)]$./inputtest.sh <tempfile
- Enter ID :
- Enter New password :
- get user id hello and password worldpasswd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement