xonsh能否将子进程输出到python函数?你知道吗
int($(ls|wc -l)) > 20
作为
ls | wc -l | int > 20
我可以靠近
from toolz import pipe
pipe($(ls |wc -l),int) > 20
这是寻找港口的方法
# bash
[ $(ls |wc -l ) -gt 20 ] && echo busy dir
# xonsh
test @$(ls |wc -l) '-gt' 20 and echo busy dir
# xonsh with more python
len(`[^.].*`) > 20 and echo busy dir
目前没有回答
相关问题 更多 >
编程相关推荐