关于在 MIUI 中无 ROOT 提取 Steam 令牌密钥,可见:
https://laurelcafe.github.io/2020/09/05/4060261005/#Steam%E5%9C%A8PC%E4%B8%8A%E4%BD%BF%E7%94%A8TOTP
https://laurelcafe.github.io/2020/09/05/4060261005/#Steam%E5%9C%A8PC%E4%B8%8A%E4%BD%BF%E7%94%A8TOTP
#!/bin/bash
thread=8
loop=100
mkfifo tmp # create temp named pipe
exec 5<>tmp # link fd with named pipe
# -> s = semaphore($thread)
for i in `seq $thread`; do
echo
done >&5
for i in `seq $loop`; do
read -u5 # s.acquire()
{
# execute command here
echo >&5 # s.release()
} &
done
wait
rm -rf tmp
Edit: 由群友推荐同样可以实现此功能的有 GNU parallel、xargs,也可手工使用 & 和 wait 维护