Http://blog.sciencenet.cn/blog-588243-502678.html? Collcc = 132586598 &
Your error message seems to indicate pollution of your data with CRS.
") Syntax error: Invalid Arithmetic Operator (error token is"
Notice how the stuff that's supposed to come after the current end of your line is at the beginning. that's most likely because your error token is in fact a Cr (which is a carriage return character-a character that instructs the terminal to put the cursor
On the beginning of the Line). These characters are almost only used by Windows machines where they are part of line endings.
I will assume that you're working on a Windows machine and that your "date" command gave the output followed by a "Windows" newline, which is actually a \ r \ n (carriage return, newline ). the $ () always strips trailing newlines, which leaves the \ r at the end
Causing parsing problems in your script.
Here, the following command produces your error on UNIX:
$ Foo = $'5 \ R'; echo
$(5 + Foo ))
") Syntax error: Invalid Arithmetic Operator (error token
Is"
To resolve the issue, you need to get rid of the \ r in your data. You can use parameter expansion for this, or tr (1 ).
$ Foo = $'5 \ R'; echo
$(5 + $ {Foo // $ '\ R '}))
10
Foo = $'5 \ R'; echo
$(5 + $ (tr-d' \ R' <"$ foo ")))
10