echo $sample_text} echo script starting echo $sample_textfooecho script (Web hosting rating)
echo $sample_text} echo script starting echo $sample_textfooecho script ended echo $sample_textexit 0In the absence of a returncommand specifying a return value, a function returns the exit status of command executed. Try It Out Returning a ValueIn the next script, my_name, we show how parameters to a function are passed and how functions canreturn a trueor falseresult. You call this script with a parameter of the name you want to use in 1.After the shell header, we define the function yes_or_no: #!/bin/shyes_or_no() { echo Is your name $* ? while truedoecho -n Enter yes or no: read xcase $x iny | yes ) return 0;; n | no ) return 1;; * ) echo Answer yes or no esacdone} 2.Then the main part of the program begins: echo Original parameters are $* if yes_or_no $1 thenecho Hi $1, nice name elseecho Never mind fiexit 049ShellProgrammingb544977