a=(aa bb cc)Now we can display the content with
$echo ${a[@]} aa bb ccFirst, give some naive solutions a try
$for el in ${a[@]}; do echo -n ,$el; done ,aa,bb,cc
$printf ",%s" ${a[@]} ,aa,bb,ccBoth work well, right? Hmm.. almost.
The last thing to do is get rid of the first comma
$for ab in ${a[@]}; do echo -n ,${ab}; done | cut -c2- aa,bb,cc
Brak komentarzy:
Prześlij komentarz