I need to delete all commands in my history matching a string. I'veI've tried:
$ history | grep searchstring | cut -d"d" "" -f2 | history -d
-bash: history: -d: option requires an argument
$ history | grep searchstring | cut -d"d" "" -f2 | xargs history -d
xargs: history: No such file or directory
$ temparg() { while read i; do "$@""$@" "$i";"$i"; done }
$ history | grep searchstring | cut -d"d" "" -f2 | temparg history -d
(no error, but nothing is deleted)
(no error however nothing is deleted)
What is the solutionright way to do this?