在awk cli的同一列中分隔两个词?
Separate two words in the same colum in awk cli?
在 CLI 中我输入:
$ timedatectl | grep Time | awk '{print }'
这给了我正确的输出:
Country/City
我怎样才能在没有国家/地区的情况下从城市打印出来?
改为使用此命令:
timedatectl | grep Time | awk '{print }' | cut -d/ -f2
在 CLI 中我输入:
$ timedatectl | grep Time | awk '{print }'
这给了我正确的输出:
Country/City
我怎样才能在没有国家/地区的情况下从城市打印出来?
改为使用此命令:
timedatectl | grep Time | awk '{print }' | cut -d/ -f2