[英]Linux ssh output of two commands in an input
I am looking for a command that will let me look for an rpm installed in my machine and remove it, the only information about the rpm to delete that I have is a suffix of its name, that's what I want to do in one command:我正在寻找一个命令,它可以让我查找安装在我的机器上的 rpm 并将其删除,关于要删除的 rpm 的唯一信息是它的名称的后缀,这就是我想在一个命令中执行的操作:
rpm -qa | grep -i $rpmnameSuffix >> output
rpm -e output
Use command substitution to substitute the output of a command into another command line.使用命令替换将命令的 output 替换为另一个命令行。
rpm -e "$(rpm -qa | grep -i $rpmnameSuffix)"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.