Timeline for Executing a Bash Script Function with Sudo
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 3 at 0:38 | comment | added | dave_thompson_085 | I don't get the output you show for the second case ('parse' not 'pass'). And the cat isn't needed, sudo bash <<EOS followed by the heredoc is equivalent (bash already implements heredocs and herestrings as pipes). But of course if anything in the function (directly or indirectly) reads stdin for user input, it won't work. | |
| S Dec 6, 2018 at 20:42 | history | suggested | voices | CC BY-SA 4.0 | formatted code for readability |
| Dec 6, 2018 at 19:05 | review | Suggested edits | |||
| S Dec 6, 2018 at 20:42 | |||||
| Jan 25, 2018 at 23:54 | comment | added | BryKKan | Very interesting. I'll have to try it out at some point. And yes, the menu function would have been declared before this point, as fis invoked from a menu. | |
| Jan 25, 2018 at 21:08 | history | answered | user147505 | CC BY-SA 3.0 |