I am trying to assign the output of a dscl command (contains name<spaces>id) to a variable as an array. Currently I am piping the output into a tmp file, then reading the tmp file into an array, then parsing the array. I would like to bypass creating the tmp file portion of the code.
If seperated by spaces, maybe you can assign directly to an array variable like
output=( $(dscl -u diradmin -P password /LDAPv3/127.0.0.1 -list /Users UniqueID) )
# ${#output[@]} Gives the number of elements in the array
# ${output[$i]} Will return the element i of the array
# Attention : the first element has the index 0
Yeah !
Apologize for my poor english !
Did you know that the turkey is named "dinde" in french ?
It's because they called them "poule d'Inde" (literraly "indian chicken").
But there's no Thanksgiving in France and the turkey is for Christmas.
Haapy Thanksgiving to You !