Bash Percentage Calculator For Linux
Page 1 of 1
Bash Percentage Calculator For Linux
- Code:
#!/bin/bash
# (c) J~Net 2016 Bash Percentage Calc
# this will calc percentage % Forum http://jnet.forumotion.com/t1034-bash-percentage-calculator-for-linux#1364
# Usage: bash perc.sh
echo -e "Enter A Number \c" # get user input
read INPUT
num1=$INPUT
echo -e "Enter The Desired Percentage \c" # get user input
read INPUT2
num2=$INPUT2
echo -e $((INPUT / 100 * INPUT2))
Version 2
- Code:
#!/bin/bash
# (c) J~Net 2016 Bash Percentage Calc
# this will calc percentage %
# Usage: bash perc.sh
echo -e "Enter A Number \c" # get user input
read INPUT
echo -e "Enter The Desired Percentage \c" # get user input
read INPUT2
tot=$((INPUT / 100 * INPUT2))
echo -e "Your Number "$INPUT
echo -e "Percentage "$INPUT2
echo -e "Answer "$tot
Last edited by jamied_uk on 26th January 2016, 22:40; edited 3 times in total
Similar topics
» how to calculate percentage increase In Linux Bash
» Linux Bash Dog Age Calculator Script
» Voltage Divider Calculator For Linux Bash
» Light Speed Calculator For Linux Bash
» Linux Calculate A Percentage Of A Number
» Linux Bash Dog Age Calculator Script
» Voltage Divider Calculator For Linux Bash
» Light Speed Calculator For Linux Bash
» Linux Calculate A Percentage Of A Number
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum