Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- exec 2>>file_log
- echo This will be printed to stdout, as expected
- ls ThereIsNoSuchFileOnEarth # this will go to “file_log”, as expected
- read –p 'User would never see this prompt and it would go to file_log. Totally unexpected.' –r -e test
- species=”Daleks Raxacoricofallapatorians Judoon”
- select enemy in $species;
- do
- # …code omitted as the user would never see the list. It would go into file_log again!
- done
- read .... 2> /dev/tty
Add Comment
Please, Sign In to add comment