xxxxxxxxxx
gamma_t=540
gamma_new="$(($gamma_t-360))" # get gamma_new by $gamma_t-360
num2="$(($num1+num2))"
$((expression)) # you can do expressions like this
a=5
yourname_$(($a-1)) #dynamic variables.
#will give
yourname_4
xxxxxxxxxx
#!/bin/bash
# Naked variables
echo
# When is a variable "naked", i.e., lacking the '$' in front?
# When it is being assigned, rather than referenced.
# Assignment
a=879
echo "The value of \"a\" is $a."
# Assignment using 'let'
let a=16+5
echo "The value of \"a\" is now $a."
echo
# In a 'for' loop (really, a type of disguised assignment):
echo -n "Values of \"a\" in the loop are: "
for a in 7 8 9 11
do
echo -n "$a "
done
echo
echo
# In a 'read' statement (also a type of assignment):
echo -n "Enter \"a\" "
read a
echo "The value of \"a\" is now $a."
echo
exit 0
xxxxxxxxxx
# Set a variable named "my_variable" with a value
my_variable="Hello, world!"
# Access the value of the variable
echo $my_variable
xxxxxxxxxx
// choose one of the following depending on whats installed
#audio_prg="espeak-ng"
#audio_prg="espeak"
audio_prg="spd-say"
// turn up your volume
${audio_prg} "this is a test using $audio_prg"