List to data
# Put the values in list into and array called data.
function list_to_data {
declare ltd_d
declare -i ltd_idx
unset data
ltd_idx=0
for ltd_d in $@
do
data[$ltd_idx]=$ltd_d
((ltd_idx++))
done
echo ${data[@]}
}
function list_to_data {
declare ltd_d
declare -i ltd_idx
unset data
ltd_idx=0
for ltd_d in $@
do
data[$ltd_idx]=$ltd_d
((ltd_idx++))
done
echo ${data[@]}
}
list_to_data a b c d e f
echo ${data[@]}
a b c d e f
Comments
Post a Comment