|
props, this thread is really close to violating our rule against homework/classwork. But I will help you with this.
Your login shell reads your .profile and thus knows the function. The script command fires up a subshell and the subshell does not read your .profile. So as your first command after you run script, do this:
. .profile
|