$ echo "10 * 10" | bc
100
$
Também é possível chamado o bc e executar os cálculos dentro do sistema.
$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
10 * 10
100
10 * (10 + 5)
150
quit
$
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
10 * 10
100
10 * (10 + 5)
150
quit
$
Não sei porque o Bc não está disponível no Debian 7, mas você ainda pode instalá-lo usando o repositório "oldstable".
Nenhum comentário:
Postar um comentário