I am trying to save all output of a collection to separate files. For example one function will be like:
function kernel_info(){
echo "Kernel version: $(uname -v)"
}
I want to write this output to file which will have kernel_info as it name. Similarly I will create other functions to gather other information like hostname, etc. How can I write a function which I can call every time I want to save the information to a file on disk? Thanks