1 | initial version |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
Note that the =
is also not taken into account.
2 | No.2 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
Note that the =
is also not taken into account.
^
to specify the beginning of the string and use .*
instead of *
: $ A='aze-n=aze' $ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi A='-naze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
$ A='-n=aze' $ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi hop
3 | No.3 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
A better solution would be to add a ^
to specify the beginning of the string and use .*
instead of *
:
$ A='aze-n=aze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
4 | No.4 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
A better solution would be to add a ^
to specify the beginning of the string and use .*
instead of *
:
$ A='aze-n=aze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
A='-naze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
$ A='-n=aze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
hop
It is reported as trac ticket 17685.
5 | No.5 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
A better solution would be to add a ^
to specify the beginning of the string and use .*
instead of *
:
$ A='aze-n=aze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
A='-naze'
$A='-naze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
$ A='-n=aze'
$ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi
hop
It is reported as trac ticket 17685.
6 | No.6 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
A better solution would be to add a ^
to specify the beginning of the string and use .*
instead of *
:
$ A='aze-n=aze'
$ if [[ $A =~ ^'-n='.* ^-n=.* ]] ; then echo hop ; fi
$A='-naze'
$ if [[ $A =~ ^'-n='.* ^-n=.* ]] ; then echo hop ; fi
$ A='-n=aze'
$ if [[ $A =~ ^'-n='.* ^-n=.* ]] ; then echo hop ; fi
hop
It is reported as trac ticket 17685.
7 | No.7 Revision |
This is a bug, thanks for reporting. On the file src/bin/sage
, there is a condition:
if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then
sage-cleaner &>/dev/null &
exec sage-notebook "$@"
fi
The problem is that it is accepted if -n
is part of the variable $1
, not only a prefix, as you can check with:
$ A='aze-naze'
$ if [[ "$A" =~ "-n="* ]] ; then echo hop ; fi
hop
A better solution would be to add a ^
to specify the beginning of the string and use .*
instead of *
:
$ A='aze-n=aze'
$ if [[ $A =~ ^-n=.* ]] ; then echo hop ; fi
$A='-naze'
$ A='-naze'
$ if [[ $A =~ ^-n=.* ]] ; then echo hop ; fi
$ A='-n=aze'
$ if [[ $A =~ ^-n=.* ]] ; then echo hop ; fi
hop
It is reported as trac ticket 17685.