In linux, in bash scripting, expression expansion syntax can be either, for example: echo $[2*2] , or equavilantly: echo [...]
Answer
`expr 2 '*' 2`
^^ note the use of single backwards quotes wrapped around statement
^^ note the escaping of the shell special char * around single normal quotes, escaping of * can also be done via: \*
Question
In linux, in bash scripting, expression expansion syntax can be either, for example: echo $[2*2] , or equavilantly: echo [...]
Answer
?
Question
In linux, in bash scripting, expression expansion syntax can be either, for example: echo $[2*2] , or equavilantly: echo [...]
Answer
`expr 2 '*' 2`
^^ note the use of single backwards quotes wrapped around statement
^^ note the escaping of the shell special char * around single normal quotes, escaping of * can also be done via: \*
If you want to change selection, open document below and click on "Move attachment"
7. Shell Scripting do A=`expr $A '*' $N` N=`expr $N - 1` done echo $A } We can see that the square braces used further above can actually suffice for most of the times where we would like to use expr . (However, <span>$[] notation is an extension of the GNU shells and is not a standard feature on all varients of UNIX.) We can now run factorial 20 and see the output. If we want to assign the output to a v
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.