在 Arch 上安装 python 包的推荐方法是什么?在 AUR 上搜索它们并从那里安装它们(或创建一个PKGBUILD
文件来自己制作软件包)或使用pip
?
我从安装 pacman 和 AUR 的东西开始,不知道与pip
包混合是否明智。
我正在尝试使用chpasswd
. 密码应该随机生成并打印到stdout
(我需要写下来或将它们放在密码存储中),并且还传递到chpasswd
.
天真地,我会这样做
{
echo student1:$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')
echo student2:$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo '')
} | tee >(chpasswd)
Run Code Online (Sandbox Code Playgroud)
但是我担心将新密码作为命令行参数传递给echo
,因为其他用户通常可以看到参数ps -aux
(尽管我从未看到任何echo
行出现在ps
)。
是否有另一种方法可以为我返回的密码添加一个值,然后将其传递给chpasswd
?