【发布时间】:2020-03-31 17:26:54
【问题描述】:
我有以下 bash 脚本,我想进入 fakeroot 环境,然后运行其他命令,然后退出,我可以运行我的笔记本电脑 ubuntu 终端。
$ cat test_root.sh
#!/bin/bash
set -u
set -e
fakeroot
echo "my $UID"
exit
但该脚本不起作用,感谢您提供修复它的线索。
$ ./test_root.sh
root\#
root\# exit
exit
my 1000
谢谢。
亲切的问候,
【问题讨论】: