Using bash process substitution for a sudo command

后端 未结 4 834
逝去的感伤
逝去的感伤 2021-02-06 01:41

I would like to use bash process substitution for a sudo command.

For example, here\'s a non-sudo command that works for me:

$ cat <(echo \"installed.         


        
4条回答
  •  既然无缘
    2021-02-06 02:16

    Try doing this in your shell :

    $ sudo bash -c 'cat <(echo "installed.txt for UID=$UID")'
    installed.txt for UID=0
    

提交回复
热议问题