Guest User

Untitled

a guest
Aug 14th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. exec 2>>file_log
  4.  
  5. echo This will be printed to stdout, as expected
  6.  
  7. ls ThereIsNoSuchFileOnEarth # this will go to “file_log”, as expected
  8.  
  9. read –p 'User would never see this prompt and it would go to file_log. Totally unexpected.' –r -e test
  10.  
  11. species=”Daleks Raxacoricofallapatorians Judoon”
  12.  
  13. select enemy in $species;
  14. do
  15. # …code omitted as the user would never see the list. It would go into file_log again!
  16. done
  17.  
  18. read .... 2> /dev/tty
Add Comment
Please, Sign In to add comment