Greetings all,
I have developed two functions: function_find () and function_replace (), and use them in a following script find_replace.sh:
However the script did not work as expected due to an error in the function_find () . So I modified the function_find () , which worked stand alone, but I have forgotten to propagate the modification to the find_replace.sh.
Is there a way to call the functions from the script without having to literally include them?
Kindest regards,
M
I have developed two functions: function_find () and function_replace (), and use them in a following script find_replace.sh:
Code:
#!/usr/bin/env sh
# Functions definitions
function_find()
{
commands...
commands...
}
function_replace ()
{
commands...
commands...
}
# Main
function_find () > my_file
if [ -s my_file ]
then
function_replace () < my_file
else
printf %s\\n "File "$my_file" does not exist."
fi
Is there a way to call the functions from the script without having to literally include them?
Kindest regards,
M