command: bc
usage: An arbitrary precision calculator language
syntax: bc [-hlwsqv] [long-options] [ file ... ]
examples:
1. To print info and help of this command
$ bc --help
2. calculation using echo command
$ echo "5*6" | bc
30
3. using previous steps results in the present calculation
$ echo "5*6;last/3" | bc
30
10
4. $ echo "5*3;./5" | bc
15
3
'.' the dot represents the result of previous calculation
5. $ bc <<< 10+10
20
6. executing calculation from a file
$ cat cal.txt
#/*add the value 1+2 /*
2+2
quit
$ bc cal.txt
4
regards,
dhanasekar
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines