Linux Bash Dog Age Calculator Script

Go down

Linux Bash Dog Age Calculator Script

Post by jamied_uk on 20th December 2017, 16:41





Code:
#!/bin/bash
echo "Dog Calc"
echo ""
echo "Enter Human Years For Dog"
read hyd # this reads user input
echo ""
echo "You Entered... "
echo "$hyd" # echos back the var
#
num2="7" # is the multiplyer
# now to times by multiplyer
num=$(($hyd * $num2))
#
echo "Dog Years... "
# Echo results!!!
echo $num
avatar
jamied_uk
Admin

Posts : 2408
Join date : 2010-05-09
Age : 35
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum