On 04/20/18 12:38, Brian wrote:
DECRYPT=$(scrypt dec /usr/local/bin/myscript) && eval "$DECRYPT"
On 04/21/18 09:36, David Wright wrote:
If so, then won't the password be revealed by ps while eval is evaluating it?
Apparently, not: 2018-04-21 13:02:16 dpchrist@vstretch ~/sandbox/sh $ cat environment-var-ps CMD="echo hello" && eval "$CMD" && sleep 3 && echo world! & ps -f 2018-04-21 13:02:18 dpchrist@vstretch ~/sandbox/sh $ dash environment-var-ps hello UID PID PPID C STIME TTY TIME CMD dpchrist 1681 1268 0 11:42 pts/1 00:00:00 -bash dpchrist 2541 1681 0 13:02 pts/1 00:00:00 dash environment-var-ps dpchrist 2542 2541 0 13:02 pts/1 00:00:00 dash environment-var-ps dpchrist 2543 2541 0 13:02 pts/1 00:00:00 ps -f dpchrist 2544 2542 0 13:02 pts/1 00:00:00 sleep 3 2018-04-21 13:02:21 dpchrist@vstretch ~/sandbox/sh $ world! 2018-04-21 13:03:03 dpchrist@vstretch ~/sandbox/sh $ bash environment-var-ps hello UID PID PPID C STIME TTY TIME CMD dpchrist 1681 1268 0 11:42 pts/1 00:00:00 -bash dpchrist 2556 1681 0 13:03 pts/1 00:00:00 bash environment-var-ps dpchrist 2557 2556 0 13:03 pts/1 00:00:00 bash environment-var-ps dpchrist 2558 2556 0 13:03 pts/1 00:00:00 ps -f dpchrist 2559 2557 0 13:03 pts/1 00:00:00 sleep 3 2018-04-21 13:03:05 dpchrist@vstretch ~/sandbox/sh $ world! David