如何将后面行中每个单词的第一个字符转换gr-description:
为大写?
例如 :
$ cat /tmp/test1
groMail:
[email protected]
gr-description:
abc-location-999
group-emailid:
[email protected]
members:
[email protected]
[email protected]
[email protected]
输出应该是
groMail:
[email protected]
gr-description:
Abc-Location-999
group-emailid:
[email protected]
members:
[email protected]
[email protected]
[email protected]
我尝试了下面的命令,但无法合并
sed -n '/gr-description:/{n;p;}' grp1 | sed 's/\<./\u&/g'