Hello, I am having issues with a bash script and I was wondering if anyone
could be of assistance? Its just that our lecturer assumed it would be easy
to pick up and do an assignment on, even though we haven't learnt it and its
not a pre-requisite.

But anyway, I noticed when I use the cut command to obtain some numbers from
a file, I cannot use it in an arithmetic operation. I tried the following:
temp='expr $val1 + $val2'
But I get the following error message:
expr: non-numeric argument

I was wondering if BASH requires type conversion? I even printed out the
values for $val1 and $val2. They look like integers to me. If anyone could
help me, it would be greatly appreciated.

Thanks in advance

Tony




_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to