Reputation: 131
I just try to put variable inside variable but it doesn't work... How can i Fix it?
DEL=$(find . -type f | sed "s/^.*\///g" | sed -n '/\./p' | sed "s/.*\.//g" | uniq)
EL=$(${DEL} | tr '\n' ',' | sed 's/,$//')
Upvotes: 0
Views: 52
Reputation: 2946
You can try
EL=$(tr '\n' ',' <<< "$DEL" | sed 's/,$//')
or
EL=$(echo "$DEL" | tr '\n' ',' | sed 's/,$//')
Upvotes: 1