I have setup several functions in my
.bashrc file. I would like to just display the actual code of the function and not execute it, to quickly refer to something.
Is there any way, we could see the function definition?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You can use the
type command to do this.
type yourfunc will print the function to STDOUT. As
man type says,
The type utility shall indicate how each argument would be interpreted if used as a command name.