sed删除所有大写字母 [英] sed remove all capital letters

查看:68
本文介绍了sed删除所有大写字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用下面的sed命令仅在以下字符串中删除所有出现的大写字母,但它仅输出我输入的字符串-如何正确放置替换?

I am trying to delete all occurences of Capital Letters only in the following string with the sed command below but it is only outputting the sting that I enter - how do I put the substitution in correctly ?

echo "Dog boy Did Good" | sed 's/\([A-Z]\+\)/\1/g'

推荐答案

echo "Dog boy Did Good" | sed 's/[A-Z]//g'

这篇关于sed删除所有大写字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆