The following script:
#!/bin/bash
nested_func() {
echo $1
echo $2
}
func() {
echo $1
nested_func $2
}
func 1 "2 '3.1 3.2'"
Outputs:
1
2
'3.1
What I would like to get as output is:
1
2
3.1 3.2
How do I achieve this output with a single parameter on func
instead of many?
EDIT made to address simplifications