Code: Select all
d6=$[ ( $RANDOM % 6 ) +1 ]
Code: Select all
r=$(($d6 * 3))
Now if I use the line for multiplying the die throw by 3 I get an error, Technically I should be right, but I haven't the clue what's wrong.
Oh and one more question, I've run into another syntax error. What's the proper way to call a function from within another? Reason I ask is that I have server functions, one leading to the other and it would help if I knew how to pass the program to the next.
Thanks in advance.
P.S. This is part of a table top RPG NPC character generator application, written in bash (obviously). Thought I'd help add more info to give anyone an idea of the bigger picture. And if anything else causes me problem I hope you can help, I'll add code as I need help with it.