Греп -проверка
if grep -q 'foo' ~/.bash_history; then
echo "You appear to have typed 'foo' in the past"
fi
Nicolas Chaillou
if grep -q 'foo' ~/.bash_history; then
echo "You appear to have typed 'foo' in the past"
fi