Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] screenfetch print error message when LANG=zh_CN.UTF-8 #727

Open
hzhangxyz opened this issue Jun 7, 2021 · 0 comments
Open

[Bug] screenfetch print error message when LANG=zh_CN.UTF-8 #727

hzhangxyz opened this issue Jun 7, 2021 · 0 comments

Comments

@hzhangxyz
Copy link

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

I have create an issue for free here


free -b output:

               total        used        free      shared  buff/cache   available
内存:25048236032  2776240128 12871360512  1027239936  9400635392 20846157824
交换:          0           0           0

screenshot problematic code

mem=$(free -b | awk 'NR==2{print $2"-"$7}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant