UNIX / Linux Shell Scripting Tutorial

Unix / Linux Shell Scripting Tutorial

MPG Calculator

This relates to Imperial quantities - that is, this works for UK visitors.

If you use US Gallons, the calclations will be incorrect. If you would like this feature to allow the option of US Gallons, please mail me and I will add that option. However, the "Pence Per Litre" option should work for all decimal (xx.xx) currencies.

LitresHow many Litres you put into the car
MilesHow many Miles the car drove
Pence Per LitreHow many pence you paid per litre at the pump

You can view the source here: mpg.phps

Suggested books: Recommended Reading
StumbleUponStumbleUpon | del.icio.usdel.icio.us

Site Links



1. Intro
2. Philosophy
3. A First Script
4. Variables - Part I
5. Wildcards
6. Escape Characters
7. Loops
8. Test
9. Case
10. Variables - Part II
11. Variables - Part III
12. External Programs
13. Functions
14. Hints and Tips
15. Quick Reference
16. Interactive
17. Exercises
18. Forum
19. Recommended Books




My blog has tips about how to use Unix and Linux commands XML



contact