On Mon, Jan 05, 2015 at 12:59:17PM -0800, kcrisman wrote:
> if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; 
> [..]
> 
> Is there an obvious way to remove the =~ from this [..]?

this likely works with older bash
$ foo=bar
$ echo ${foo:0:2}
ba

and this
$ if [ "${1:0:11}" = "--notebook=" ] || ...
might do the trick.

have fun
felix

PS: also, the "*"s in the original line look suspiciously unescaped (is this a 
bug?).
from the manual:

 The special pattern characters have the following meanings:

                                  *      Matches any string, including the null 
string.  When the
                     globstar shell option is enabled, and * is used in a 
pathname expansion
                     context, two adjacent *s used as a single pattern will 
match all files and zero
                     or more  directories  and  subdirectories.  If followed by 
a /, two adjacent *s
                     will match only directories and subdirectories.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to