Reputation: 45
I am working on updating a script to append the loop number iteration to a filename. However I can't find any documentation that will help me update the variable value. Instead, it appends the operation as a string.
(base) me@axoneme:~$ tcsh
axoneme:~> set j=100
axoneme:~> set j=$j+1
axoneme:~> echo $j
100+1
How can I do arithmetic in tcsh such that the 102nd loop will just be set j= $j + 1 where $j =101
Upvotes: 0
Views: 94
Reputation: 45
@ sign seems to be used in tcsh
axoneme:~> set j = 100
axoneme:~> @ j = 100 + 1
axoneme:~> echo $j
101
Upvotes: 1