Open hzhangxyz opened 3 years ago
My screenfetch output is
/usr/bin/screenfetch:行1802: 2767982592-:语法错误: 需要操作数 (错误符号是 "-") ...
This is because screenfetch get the result from free -b, while when LANG=zh_CN.UTF-8, the result cannot be split by space. So later awk give the wrong result
free -b
awk
I have create an issue for free here
free
free -b output:
total used free shared buff/cache available 内存:25048236032 2776240128 12871360512 1027239936 9400635392 20846157824 交换: 0 0 0
screenshot problematic code
screenshot
mem=$(free -b | awk 'NR==2{print $2"-"$7}')
My screenfetch output is
This is because screenfetch get the result from
free -b
, while when LANG=zh_CN.UTF-8, the result cannot be split by space. So laterawk
give the wrong resultI have create an issue for
free
herefree -b
output:screenshot
problematic code