what is export in shell script code example

Example 1: what does the export command do in linux

export variable_name
# It is used to ensure enviroment variable and funtion to be
# passed it to child process as 
./child.sh

Example 2: export function in shell script

export command is used to export a variable or function to the environment of all the child processes running in the current shell. export -f functionname # exports a function in the current shell. It exports a variable or function with a value. “env” command lists all the environment variables.