bash:functions
This is an old revision of the document!
BASH - Functions
Bash allows you to add local functions.
Keep Bash Functions Seperate from Bash Aliases
It is recommended to keep functions seperate in their own file.
Create a new file called /etc/profile.d/bash_functions.sh or ~/.bash_functions and then have your .bashrc load it:
# PETER ADDED THIS if [ -f ~/.bash_functions ]; then . ~/.bash_functions fi
or
if [ -e $HOME/.bash_functions ]; then source $HOME/.bash_functions fi
bash/functions.1589634083.txt.gz · Last modified: 2020/07/15 09:30 (external edit)