1
Я пишу функциюКак изменить строку внутри функции?
func-def.sh:
function func() {
# assign _f_desc here ....
}
run-main.sh :
function call_all_func() {
source func-def.sh
# when I call the function from here
_f_desc=
func _f_desc
# here I must get the function description of the function
# that was last executed ...
}
Короче я хочу передать _f_desc
в func()
и ожидая func()
, чтобы заполнить короткую строку, описывающую его использование .. напр. _f_desc
может содержать "This function multiplies 2 nos"