An example would be
$ twice 15<br>
30<br>
$twice 0<br>
0<Br>
$
I understand that the basic of expr is
expr arg1 * arg2
What if I want to specify arg1 as 2 and arg2 as whatever the user types.
But I cant seem to make the program run, always a syntax error.
I use vi editor to make a new file and put the expr code in the file called (twice).
In the shell you need to escape the *-operator:
otherwise bash will replace it.
And in a script called twice.sh
can then be called like this (after chmod 755 twise.sh)
to print out 30.