You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using dash to run screencast it terminated with this error message:
dash /usr/local/bin/screencast -s 1280x720 -p 200,234 sc2.mp4
screencast v1.6.0 - Copyright (c) 2015-2023 Daniel Bermond
Command line interface to record a X11 desktop
https://github.com/dbermond/screencast/
[ screencast ] initializing
/usr/local/bin/screencast: 3215: arithmetic expression: expecting primary: ""1280" % 8"
The error is caused by this code (line 66 in screen.sh)
check_dimension() {
# the dimension will be a multiple of 8 if the remainder is 0
[ "$(("$1" % 8))" = '0' ]
}
The cause is that "$1" is quoted. When removing the quotes, dash processes this fine. [ "$(("$1" % 8))" = '0' ]
I would say that quotes are not needed. If the value of parameter is empty or contains spaces the result should be invalid anyway.
Debian uses /bin/sh as a symbolic link to dash. So when calling screencast as executable it terminates with this error. The easiest solution for Debian users is to call screencast explicitely with bash.
Or, as I did, replace the symbolic link with a pointer to bash. I cannot imagine when I would use dash instead.
jlinkels
The text was updated successfully, but these errors were encountered:
When using dash to run screencast it terminated with this error message:
The error is caused by this code (line 66 in screen.sh)
The cause is that "$1" is quoted. When removing the quotes, dash processes this fine.
[ "$(("$1" % 8))" = '0' ]
I would say that quotes are not needed. If the value of parameter is empty or contains spaces the result should be invalid anyway.
Debian uses /bin/sh as a symbolic link to dash. So when calling screencast as executable it terminates with this error. The easiest solution for Debian users is to call screencast explicitely with bash.
Or, as I did, replace the symbolic link with a pointer to bash. I cannot imagine when I would use dash instead.
jlinkels
The text was updated successfully, but these errors were encountered: