I want to output "hello" when rpm -qf /etc/redhat-release
is typed.
Otherwise rpm should work as it would normally.
1 Answer
Doesn't seem overly useful, but a function would do the trick:
rpm() {
if [ "$1" = "-qf" ] && [ "$2" = "/etc/redhat-release" ]
then
echo hello
else
command rpm "$@"
fi
}