Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, write bash script function called greeting, that takes a single argument, some name, and print "hello <name>", e.g. "hello Kevin". Also call the function to test it.
Answer
function greeting()
{
    echo "hello $1"
}

greeting Kevin

Question
In linux, write bash script function called greeting, that takes a single argument, some name, and print "hello <name>", e.g. "hello Kevin". Also call the function to test it.
Answer
?

Question
In linux, write bash script function called greeting, that takes a single argument, some name, and print "hello <name>", e.g. "hello Kevin". Also call the function to test it.
Answer
function greeting()
{
    echo "hello $1"
}

greeting Kevin
If you want to change selection, open document below and click on "Move attachment"

Pass arguments into a function - Linux Shell Scripting Tutorial - A Beginner's handbook
de] 1 Example 1.1 Function shell variables 1.1.1 How Do I Display Function Name? 1.1.1.1 FUNCNAME in action 1.2 Example Example Create a function called fresh.sh: #!/bin/bash # write a function <span>fresh(){ # t stores $1 argument passed to fresh() t=$1 echo "fresh(): \$0 is $0" echo "fresh(): \$1 is $1" echo "fresh(): \$t is $t" echo "fresh(): total args passed to me $#" echo "fresh():

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.