[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[OT] bc und mathematisches problem



Hallo,

ich benötige eine kleine Function die "0" zurückgibt, wenn eine Zahl
durch eine andere Zahl geteilt wurde und das resultat ein INTEGER ist
sowie "1" bei einem FLOATINGPOINT. (kann auch anderst rum sein)

Weis jemand wie man das realisieren kann?

Murks ist jedenfals:  

    echo "scale=4;$(date +%s) / 123" |bc |grep '.0000' ; echo $?

würde aber soweit funktionieren nur will ich das "scale=4" und "grep"
vermeiden.

Thanks, Greetings and nice Day
    Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: