Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 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.

click to hide/show revision 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.

A better solution would be to add a ^ to specify the beginning of the string and use .* instead of *:

A=azen=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

click to hide/show revision 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
A='-naze'

A='-naze' $ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi

fi $ A='-n=aze' $ if [[ $A =~ ^'-n='.* ]] ; then echo hop ; fi hop

hop
click to hide/show revision 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.

click to hide/show revision 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.

click to hide/show revision 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.

click to hide/show revision 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.