bash shell script interest calculator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dongjune
    New Member
    • May 2014
    • 1

    bash shell script interest calculator

    Code:
    #!/bin/bash
    count=0
    L=$1
    K=($2+100)/100
    R=$(echo $expr(1/12)**($K) | bc -l)
    N=$(echo "($L*$R) - $3" | bc -l)
    until [ `echo "${N%.*}"` -gt 0 ]; do
    let count=count+1
    done
    echo $count
    Last edited by Rabbit; May 9 '14, 03:40 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Luuk
    Recognized Expert Top Contributor
    • Mar 2012
    • 1043

    #2
    But what would his question be?

    Comment

    Working...