PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Linux Bash Dog Age Calculator Script

Go down

Linux Bash Dog Age Calculator Script Empty Linux Bash Dog Age Calculator Script

Post by jamied_uk 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
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

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