Re: Recomended tutoial(s) on doing arithmetic in Bash scripts
Hi.
On Sun, 5 Mar 2017 09:42:16 -0600
Richard Owlett <rowlett@cloud85.net> wrote:
> I'm interested in "expr" and "bc".
> The man pages lack reasonable examples.
> The tutorial/HOWTO pages confuse the issue with fancy page layouts
> and/or code samples showing how impressive the author can make the
> script's output.
expr 2 + 2
echo 2 + 2 | bc
and, since you mentioned bash - you don't need anything but bash to do
basic operations:
echo $((2 + 2))
Reco
Reply to: