Jawaban:
#!/bin/bash
names= find /home/devuser -name 'BI*'
echo $names
for name in {names[@]}
do
echo $name
var=$var$name //$ should be removed which is prefixed before var. Blank space before and after equal sign should be removed to run this code.
done
echo $var
find
output. Kemudian variabel array di for
's in
klausa.
var="$(IFS=; echo "${names[*]}")"
. Jadi, kecuali Anda ingin mengajar pemilik pertanyaan, tidak ada banyak manfaat dalam memperbaiki beberapa kesalahan sintaksisnya.
$
, baris for for seharusnya dibacafor name in ${names[@]}