This may seem a little trivial, but actually itβs rather complicated: Can someone explain this to me:
[~:user$]expr 3 + 2 6 [~:user$]expr 3 / 2 1 [~:user$]expr 3 * 2 expr: syntax error
When the man page for expr accurately indicates that ARG1 * ARG2 is the arithmetic product of both.
expr
Thanks,
You need to quote * , because otherwise the shell tries to decrypt the file name.
*
$ expr 3 '*' 2 6
That should be enough:
expr 3 \ * 2
* expands with your shell until expr reached, so it contains Documents , Videos , Work , nsfw , etc.
Documents
Videos
Work
nsfw
@OP, it is entirely up to you, but I still suggest using the internal shell add operation instead of calling the external expr
$ echo $(( 3*2 )) 6
If you need more math operations, use bc (dc) or awk.
Source: https://habr.com/ru/post/1299868/More articles:Determine if ELMAH is enabled? - c #Deploying nested loops in F # - f #Falling data from one form to another - c # -3.0How to check if a user is registered in media shows in another application? - pythonConnection table filtering in has_many: through RoR - ruby-on-railsAdhesion list tree using recursive WITH (Postgres 8.4) instead of nested set - djangoBetter performance or better structure - databaseDjango-like queries in Java / JPA - javaRun the GATE pipeline from within a Java program without a GUI. to create a tomcat shutter application - javaToggle visibility in jQuery - javascriptAll Articles