I\'ve got a function that I want to reference and use across different scripts. Is there any way to do this? I don\'t want to be re-writing the same function for different scrip
Yes..you can! Add source function_name in your script. I prefer to create variable eg.VAR=$(funtion_name),if you add the source function_name after #!/bin/bash then your script first execute imported function task and then your current script task so its better to create variable and used anywhere in script. thank you..Hope its work for you:)