4

Variables and math in Old skool Bourne Shell

view full story
linux-howto

http://www.unix.com – Hey everybody, I've been searching google and these forums and have found some solutions to the issues I've been having today within the OLD Bourne Shell. I am following chapter 6 of the Guide to Unix using Linux 4th Edition. I am working on some basic calculations with variables in the BASH SHELL and doing the same within the Bourne Shell with modifications. In BASH, I did the following: Code: let X=10+2*7 Type echo $X and press Enter. You see 24 on the screen. Now I realize that the bourne shell does NOT have LET as a command, and I need to use expr. I was able to get the math to w (HowTos)