5
如何删除历史记录中与给定字符串匹配的命令?
我需要删除历史记录中与字符串匹配的所有命令。我试过了: $ history | grep searchstring | cut -d" " -f2 | history -d -bash: history: -d: option requires an argument $ history | grep searchstring | cut -d" " -f2 | xargs history -d xargs: history: No such file or directory $ temparg() { while read i; do "$@" …