Ksh Tutorials :Declaring Variables

Ksh Tutorials :Declaring Variables
Filling in
When filling into a variable then one uses just it's name: state="US" and no blanks. There is no difference between strings and numbers: price=50.
When using a variable one needs to put a $ sign in front of it: print $state $price.
Set and use an array like:
arrname[1]=4 To fill in
print ${arraname[1]} To print out
${arrname[*]} Get all elements
${#arrname[*]} Get the number of elements
There are happily no declarations of variables needed in ksh. One cannot have decimals only integers.

No comments: