TotalCores=` lscpu | grep "On - line CPU (s)" | the cut - c 26-28 `
DCTCORES="$(seq -s', '0 ${(totalCores + 1)/2})"
DCTCORES_SPDELIM=` echo $DCTCORES | sed "s/,//g" `
After the operation to quote the following wrong, how to solve,,,,
Line 3: ${(totalCores + 1)/2} : bad substitution
CodePudding user response:
Curly braces to bracketsDCTCORES="$(seq -s', '0 $(totalCores + 1)/2)"