# Revision history [back]

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.

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='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

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


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.

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. 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.

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.