So I want to figure out the Operating System and execute a piece of code based on the operating system in my .vimrc
. However, I'm not able to understand where I'm going wrong.
let operating_system = system("awk -F= '/^NAME/{print $2}' /etc/os-release")
echon operating_system
echon operating_system > "CentOS Linux"
echon operating_system < "CentOS Linux"
echon operating_system ==? "CentOS Linux"
echon operating_system ==# "CentOS Linux"
This is the output I get when I start vim:
"CentOS Linux"
0100
Shouldn't ==?
and ==#
evaluate to 1? If not, why?