文件名:国家.csv
# The table below helps to find the dialing codes
# As well as other helpful information
Country,Code,Population
China,86,1330044000
India,91,1173108018
United States,1,310232863
Indonesia,62,242968342
Brazil,55,201103330
Pakistan,92,184404791
...
...
...
我想得到标题之后的所有行(不包括)。请注意,标题的第一列名称是“国家/地区”,我想对此应用忽略大小写逻辑。我尝试了几种方法,但没有得到我想要的东西。
awk 'tolower($1)=="Country";/Country/{y=1;next}y' 'countries.csv' - works
awk 'tolower($1)=="Country";/Country/{y=1;next}y' 'countries.csv' - doesn't work because I have lowercase "c"
sed with ignore case? is it possible?
sed '/Country/,$!d' 'countries.csv' - doesn't work
sed '/country/,$!d' 'countries.csv' - prints lines including header which I don't want in output