Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
系统:Linux Mint 18 / 19 Cinnamon 64 位。
壳牌:dash(POSIX)。
dash
我需要在 POSIX shell 脚本中动态考虑屏幕分辨率。
我更喜欢重用的功能。
get_screen_resolution() { xdpyinfo | awk '/dimensions:/ { print $2 }' }
resolution=$(get_screen_resolution)