Click to See Complete Forum and Search --> : shell script - expr


kumaren
08-21-2003, 06:03 AM
i am new to linux
i am actually using redhat linux 9.0 and learning shell scripts.
i am having problem when trying to assign values to variables (using expr ..)
could you show me how to do it and also refer me to some web sites on shell scripts

o0zi
08-21-2003, 01:27 PM
This JL help file on shell scripting (http://www.justlinux.com/nhf/Programming/Introduction_to_bash_Shell_Scripting.html) might be a good place to start.

To assign x the value 3, you'd do:
x=3
To print on the screen what x equals:
echo $x