the task is to write a shell script inputs are a string and a number
for example,
xxx.sh "Hello World" 3
the input will be
***************
* Hello World *
* Hello World *
* Hello World *
***************
and here is what have I got so far:
function mantra() {
echo "string is $1"
echo "number is $2"
echo $string
echo $PATH
for num in string_length; do
echo "*"
done
}
How do I count the number of characters in the string? Am I doing right? I am not exactly sure how to pass command-line arguments into my function.Blockquote