[U-Boot] setexpr syntax

Dear all,
I noticed setexpr help says: <op> can be &, |, ^, +, -, *, /, %
However, when one uses the hush shell additional escapes might be needed.
=> setexpr tst 3 & f syntax error => setexpr tst 3 | f syntax error
This works: => setexpr tst 3 | f => print tst tst=f
Not sure whether we should document this somewhere (or modify the help text). It took me a few minutes to realise what is going on, so a warning somewhere seems in place.

Dear Frans Meulenbroeks,
In message ac9c93b11002250451m3d58dbd3ve7caa50a3acedb3@mail.gmail.com you wrote:
I noticed setexpr help says: <op> can be &, |, ^, +, -, *, /, %
However, when one uses the hush shell additional escapes might be needed.
Well, yes, of course.
Not sure whether we should document this somewhere (or modify the help text). It took me a few minutes to realise what is going on, so a warning somewhere seems in place.
Please feel free to extend / update the documentation, but eventually necessary shell escapes are beyond the scope of the help message.
Best regards,
Wolfgang Denk
participants (2)
-
Frans Meulenbroeks
-
Wolfgang Denk