Discourse-setup: שורה 260: *0: שגיאת תחביר: אופרנד צפוי (אסימון שגיאה הוא "*0")

There are several ways to go here, I think. Perhaps I’d go for

avail_cores=$((`lscpu --parse=core | awk 'NF==1' | sort -u | wc -l`))

(we’re trying to calculate the total number of presently-online physical cores - not logical cores, cpus, sockets, or processors)

Would that work in your case?