This question is based on the thread.
I have the shell function
function man()
{
man "$1" > /tmp/manual; less /tmp/manual
}
The problem is there exists the command man.
How can you replace the command with my command?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Replace man “$1” with the pathname: /usr/bin/man. Or change it to use ‘which man’ within backquotes. Then run your script in the current shell. On bash/ksh you need to save your script in some file, say man.sh and then run it as ‘. ./man.sh’.
You get the idea. You can undefine the function at any time: unset -f man