Using a bash script, I need to print to the terminal a string that uses a variable that's storing a number, but for the variable to print with comma separation if it needs it.
So for example, if I had a variable with a value of 1000, I would want to print to the terminal something like:
"Count is equal to 1,000"
I'm trying to figure out if I can do this with a single printf command. Is there a formatting option for printf that can do this, or is there a way to manipulate the variable such that I can turn it into a string with comma separation?